Subwavelength metamaterial devices for integrated photonics in the near and mid-infrared