In this case your rankings for the candidates constitute a Markov matrix where you specify that your vote should "flow" from these candidates over to those candidates. For example someone voting for Alice over Bob over Carol might have a Markov matrix which states their vote is:
1.0 1.0 0.5
0.0 0.0 0.5
0.0 0.0 0.0
saying "All of the A votes I make should ideally stay for A, all of my B votes I would like to flow to A, all of my C votes I would like to flow to B or A." Part of the reason that I haven't figured this out yet is that I don't know how one should pick these numbers, exactly, to be robust against Arrow's problems (like adding another candidate not affecting the relative preferences of two existing ones).Anyway, based on the election, we average everyone's Markov matrices together! Then we start from a state where each candidate has an even share of the vote and everyone collectively determines the flow of the votes in successive cycles. This basically selects out the eigenvector of the Markov matrix with the highest eigenvalue, which represents some probability distribution among the candidates. Now to resolve the pesky problem of cyclic preferences, we use a fair random number generator to choose from the resulting probability distribution. Thus everyone has an even say in who they want to win, someone gets chosen at the end, and if someone really is strongly dominated by someone else then they will generally get eliminated by the flow of votes from the other to them.
[1] While I have you excited about randomness I am also a fan of choosing a leader at random out of the entire population, educating them during a transition period, then handing them the reins. If you happen to disbelieve in the Buddhist metaphysics then an example is the tulku system for obtaining leaders, where they follow somewhat-ambiguous instructions from the previous holder of the seat to seek out a child born at a specific place at a specific time who is believed to be the specific reincarnation of the previous holder of the seat. If you don't believe that metaphysics is right then the search essentially chooses a child at random to be the leader. Seems to usually work pretty well for them either way. There's another example from Muslim history where the leader of the dynasty did not go to one's child because one did not have children; instead it was transferred from eunuch slave-soldier to eunuch slave-solder.