Question: how are mtg packs randomized?
Answer: They aren't really random, more like semi-random. In Magic, commons, uncommoms, rares, mythics, and premium foil cards are all printed on their own sheets, then cut out, and the resulting stacks of cards are then put into packs.