There are currently many cryptocurrencies based on PoS (Proof of Stake). All these PoS algorithms differ from each other. Some or maybe all of them (I don't know) implement some kind of random election of nodes who participate in the "bookkeeping-process"/"block-forging-process" via having some amount of stake.
How can a random election work in an trustless decentralized environment?