Functionalization of nanoparticles for dispersion in polymers and assembly in fluids