Move vector type merging to a separate function in preparation for it getting