Extend merge_vertices to handle array-string case. Part of #7