I actually just put together this package: https://gitlab.com/everythingfunctional/sortff
I haven’t done any performance tests or written documentation for it yet, but it provides sorted_order, sorted and sort for integer, real, and double precision arrays.