Coded-Aperture Imaging Using Photo-Induced Reconfigurable Aperture Arrays for Mapping Terahertz Beams