Wetting of nanoparticles and nanoparticle arrays