The first n elements of values in order, as an independent copy of length n.
Same clamping rule as pf_partial_argsort. Never modifies its input.
Cheaper than pf_sort only while n stays well below the array size -- the underlying
std::partial_sort degrades past a full sort as n approaches it. At n = size this
is strictly worse than calling pf_sort.