I think your problem is closely related to Hamiltonian path in graph theory. Maybe what you can try to do is create Delaunay triangulation of your points. This will produce a set of triangle, that you can convert to a set of edges that do not self-intersect. The set of edges form a graph, then you can find or write an algorithm that finds an Hamiltonian path that goes through each vertex once and only once. Hope this gives the idea...
By "sorting" vertices, I was meaning finding the order of indices that need to be considered. Maybe the term "ordering" would have been more appropriate. The idea is to keep the original array unchanged, and work only on vertex indices. But this is just technical consideration.