Tunable metasurfaces and metadevices