Isomorphic, load-anywhere function to sort an array by scalar, deep or computed values in any standard or custom order