Text this: Modulation of relativistic electron beam characteristics by 3D-printed periodic structures