Nanoscale metamaterials tailored for optical and mechanical applications