Optical scanning using MEMS phased array for 3D display