Added support for vectors with arbitrary element types