A shape-memory scaffold for macroscale assembly of functional nanoscale building blocks