From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
I know this topic is pretty old, but I stumbled here searching for a way to do the same thing as you. After trying out your VI, I just had an idea for a much simpler solution:
Bundle the indices with the values and sort an array of clusters. The sort function will sort according to the first item of the cluster, and your indices will stay associated with each value.
Sorting the array of clusters is what's done in the OpenG VI mentioned in the original post. I'm not sure why the posted didn't just use that VI as it's freely available and its source code is open.