The ability of active matter to assemble into reconfigurable nonequilibrium structures has drawn considerable interest in recent years. We investigate how active fluids respond to spatial light patterns through simulations and experiments on light-activated self-propelled colloidal particles. We examine the processes of inverse templated assembly, which involves creating a region without active particles through a bright pattern, and templated assembly, which promotes the formation of dense particle regions through a dark pattern. We identify scaling relations for the characteristic times for both processes that quantify the interplay between the dimension of the applied pattern and the intrinsic properties of the active fluid. We also explore the assembly mechanism and dynamics of large clusters and show how assembly and inverse assembly can be combined to create any arbitrarily complex template. In addition to providing protocols for templated assembly via light patterning, our results demonstrate how the local packing fraction can be fine-tuned by modulation of the light intensity. The protocol so obtained exceeds the capabilities of conventional assembly strategies, in which packing fraction is dictated by thermodynamics, and opens the door to arbitrarily precise and programmable nonequilibrium assembly strategies in active matter.