Micropatterned Photoalignment For Wavefront Controlled Switchable Optical Devices