Use arc4random_uniform where applicable.