Nanostructured polymeric systems as nanoreactors for nanoparticle formation