Device application of metafilms and metasurfaces