Efficient generation of complex vectorial optical fields with metasurfaces