Controlling light at the nanoscale for broadband metamaterials, efficient solar cells, and subwavelength 3D imaging