Sort array of vertices

I need to iterate thru an array of vertices.

The assumption is that the vertices are all in sequential order, ie positioned next to each other on the actual static mesh.

How can I sort the array so that this is accomplished?