Rapid flash patterning of nanostructures