Optically-processed Programmable Assemblies of Nanomaterials