Switchable metamaterials for broadband absorption and generation of vector beams