The basic stub and through yard is constructed from a series of large or short curved switches, but they aren't your only options. If you have some specialty track pieces, you can produce yard layouts that increase the track density, stretch out the yard to make it thinner and longer, or just give you a completely different, albeit less realistic, look.
A natural choice for a yard is to use the parallel switch. Not only can you build very dense track layouts, but you can keep all of the branches even with one another. This approach can produuces a very skinny yard, which may be easier to fit into a layout and is, in fact, a bit more like a real yard. The down sides are that it can take a lot of parallel switches to pull off, and you get a wavy track instead of a nice, straight line.
The first form uses three of the same switch to create the most compact layout. This can easily be reversed on the other side to createa through yard. The second form uses gender changers to alternate beween the F1 and G1 switch in a stub yard. This is merely a technique for not using so many of the same switch type in one area, if that's a concern.
The basic yard configuration can also be augmented by the parallel switch. This creates a yard that is a balance between overall density and the number of parallel switches.
Again, gender changers are included so that the parallel switches can be alternated between F1 and G1.
Cross track K1 can form a long and skinny switch yard. While this doesn't really model a realistic layout, it is a reasonable stylization and is visually appealing. Cross track forms the basis of #33303, the Shunting Yard Epxansion Pack, and #33230, the vintage Container Terminal. Because this method is based on D and K1, however, it requires quite a bit of length.
Sold as part of #33307, the Advanced Expansion Pack, the curved crossing track H3 is intended for joining two circles but it can also be used to form two stub yards from a single spine.
With a branch in either direction, the double curved switches I and J are ideal for creating yard elements on both sides of the main line. One branch can be used for a stub configuration such as a classification yard, and the other for a through configuration such as an arrival or departure yard.
Here, a Maxim 3" Mini Straight is used to make a clean fit.