Sort comparison function for 1D array elements.
You may need to use explicit tags in order to use data properly.
int (int elem1, int elem2, const int[] array, Handle hndl)