Is it possible to sort the output values of Ugen arrays by output value?

Thank you for your kind explanation! I had the need to sort the array of Ugen by there output values while answering a question in the following post:

The following line contains array of Ugens:

relTimes = num.collect { |i| Rand(1, 5.0 * (i + 1) / num) }

To get a sorted result, I could do something like this:

relTimes = (num..1).collect { |i| Rand(5.4 - (i / num), 4.6) * i / num + 0.5}.poll(0);

However, as you pointed out, it is difficult to find a real sort using the native sc libraries.

I think this way could be theoretically possible, but not within a SynthDef…