pick (someone or something) out of a hat
To select someone or something entirely at random. I don't understand why our company is being targeted. It's as if the IRS picked us out of a hat to scrutinize! It doesn't really matter who gets promoted to assistant manager—just pick a name out of a hat for all I care!
pick something out of a hat
select something, especially the winner of a contest, at random.