Phased-array optics