I have a few questions regarding when a creature's stat block says humanoid (any race).
We kinda hashed these out back on the WotC boards back when...let's see if I can find my notes...ah! Note these are not official, and are meant as guidelines only, because there isn't any official guidance.
What exactly am I allowed to choose from?
Technically, you could use any humanoid race that is in a WotC-published rules source. As the DM, you are not limited to the player-approved rules options for character creation when applying modifications to NPCs, but you can't decide that a humanoid (any race) is actually a hill giant, because hill giants aren't of type 'humanoid'.
As a general rule, though, it's cleanest to only make choices from the approved character creation rules for the season you're running -- that ensures that your choices have the greatest relevance to the adventure at hand. If you really want to use the MM (or SRD), you should probably stick to humanoids that have roughly similar hit dice to the monster write-up you're using (if the write up has two hit dice, go hobgoblin rather than bugbear, for instance).
Are any of the PC races allowed?
Yes, if a race is available to a player as part of the Allowed Rules, you can choose that race as DM.
Do I get to choose subraces, if applicable?
Sub-race is part of the race choice, so this is also allowable. At this point, though, you should probably include this in your DM prep rather than doing it 'on the fly' at the table; otherwise you run the risk of slowing down the game.
Sure, it's in the PH and approved for players, so why not you?
I probably wouldn't, though, unless I knew there was a specific feat I needed to use to balance something at the table (say, Mage-Slayer for a particularly difficult-to-crack spellcaster). Mechanically speaking,
variant human is weaker than the standard human in most cases. (See the 5th and 6th paragraphs after the question.)
What traits from the race are applied to the stat block?
As many as you want. If you think an ability won't have an impact on the encounter, such as the elf Trance ability, you don't need to include it. For balance purposes, though, you should include any abilities that are actually limitations, like the halfling's Speed.
Note as well that you shouldn't change the monster write-up as a result of adding abilities, even if it would make sense to do so -- so a humanoid monster that's listed as using a shortsword that you decide is an elf should not be 'upgraded' to a longsword even though the Elf Weapon Training ability says elves are proficient with longswords.
For races with abilities that scale by level, how would those apply?
Monsters don't have levels. I wouldn't include level-dependent abilities unless there's a level specified for something in the monster description, such as spellcasting. A creature that is treated as a 5th level spellcaster can also be treated as 5th level for other abilities.
If you insist on including them, a decent rule of thumb would be to use the target level of the adventure as the level for those abilities. You might try hit dice, but that's not necessarily consistent among different monster write-ups -- for example, a bugbear has five hit dice, but doesn't have Multiattack like a 5th level melee PC would, so is it really 5th level?
This came to mind while reading 4-1. For example, could I change Churley's 4 guards into a team of Genasi that represent each element?
That would be very suitable for an adventure set during Season 2 (Elemental Evil), but not quite so 'on theme' for a Season 4 adventure. If it were a Season 3 adventure, you could make them drow elves and be on-theme. Season 1, kobolds. I don't see why you couldn't include genasi in a Season 4 adventure, but it might not have the same impact as a choice made within the context of the Curse of Strahd season, say, a were-rat. (Note that you wouldn't replace the guards' attacks with the were-rat's attacks, since the monster already has defined attacks (which means you couldn't use this as a back-door way to inflict lycanthropy on your player characters). You could include the were-rat's Keen Smell, though, if you thought it would have an impact on the encounter, say, to help them keep track of a rogue who likes to use the Hide skill a lot.)
Or could I make them High Elves/VHumans/Half-elves (High Elf) to get them Booming Blade via Cantrip/Magic Initiate?
If you're planning something like that, I'm guessing you're trying to out-munchkin your players. Good luck with that!
--
Pauper