Self-Assembly Of Functionalized Nanoparticles Into Microarrays And Gradients