Fabrication methods for functional nanoparticles and interdigitated nanoelectrodes