Nanoparticle synthesis and assembly