Nanostructure and microstructure fabrication