Smart inverse design for advanced integrated photonics using subwavelength metamaterials