Dynamic control of THz polarization modulation and multi-channel beam generation using a programmable metasurface.