If you have multiple abilities, and do not care the order in which they fire, or even if they fire: A, A, A, B, A, C, D, A, A, A, A, A, A, D etc...
Then a castrandom is the best.
You will sometimes get a lot of one ability, but in the long term it will be about an equal number of each ability.
If an ability cannot fire the random should not pick it. So you could include spells with cooldowns in the macro.

If you prefer the order it casts, for example warlock wants:
/castsequence [mod] reset=5 Unstable Affliction, Corruption, Immolation, Curse of Agony, Siphon Life
/castsequence [nomod] reset =5 Corruption, Curse of Agony, Siphon Life

Then... use a sequence.
Both have their uses, depending what you want to accomplish.