Alright, I'm gonna spill it.
I gather these by mashing the 'random card' feature on Gatherer. When I come across a card of a appropriate color I take note of the rarity. If the card is common or uncommon I roll my trusty 6 sided die. The number of commons I add is determined by the numbers 1-4(5 and 6 I re-roll). The number of uncommons I add is 1-3=1 4-6=2. Rares and mythics I just add one. Special cards are counted as commons because I'd rather not fuss about how powerful the card is.
The first 40 cards are anything of the appropriate color or two that are not lands, those go above the 20.The parenthesis are used if the starter deck has two colors.
([color A] ,[color B] ,[both colors] ,nil )
The cards are recorded and sorted by color, then added into the appropriate brackets, represented by their appropriate initial. nil represents colorless cards.
This serves to determine how many basic lands to add. But more on that later.
All non-basic lands are added into the second pool. After the 40 above are assembled I use the following equation to determine how many basic lands to add here.
([number of land card slots] / ([card type A] / ([card type A] + [card type B]))) X [number of land card slots]
Sideboard cards are simply added one at a time, nothing terribly complex.
Here I do the same mashing the random button thing unless the person is requesting from a specific block/expansion. Then I use another method involving the advanced search and random.org.
The number on the left is the maximum cards, to the right of that is the number of uncommons and rares remaining, I use this so that I know when to stop searching for commons if I ever get those all before the others.
There is a maximum of 4 uncommons and two rares. The first rare to appear is guaranteed, the second however has a 1/2 chance of being added, if that roll fails the booster may not receive the second rare. If the second rare is added, then only 9 commons are possible. If 10 commons are added before a second rare appears it may not be added.
A maximum of two colorless cards are allowed in boosters with a specific color that is not colorless. The first rare cannot be a colorless, however the second can.(again, unless the booster is colorless)
(random number)/25 + 1[unless # is a multiple of 25]
When assembling a booster that has a specific block or expansion, I use the advanced feature in combination with random.org.
The equation above is used to determine what page to go to.
Mega packs are simply 60 cards, nothing too terribly complex going on.
Random decks bought with points are the same as starter decks but without the land section, 60 cards instead of 40, and no need to record the results to determine basic lands.
Rare packs and mythic rares are incredibly simple, just 5 cards or 1 respectively.