Self-organized patterned arrays of Au and Ag nanoparticles by thickness-dependent dewetting of template-confined films