Vertex loader: more vector code

Do you think it's possible to merge this functions into a (more) templated one with if/else based on this type?