This is more of a narrative than a "recipe". Read through the whole thing and figure out exactly what your process is going to be, before starting; there are a bunch of finicky parts of the process (making roux, tempering an egg) that are time-sensitive, so you don't want to get caught pondering ratios when you're in the middle of doing those steps. (Note that where you have a prepped ingredient -- diced onion, shredded cheese, etc -- you can get somebody else to do that for you while you're cooking, or you can do it before you turn on the heat.)
Cook 0.5 lbs of elbow macaroni in a large pot. (Say, 1.5 qt or so. You want plenty of room for the pasta to bounce around in the boiling water, so it doesn't all stick together. And really, don't use any other kind of pasta. Elbows have uniquely desirable features for making casseroles: the tube is big enough to capture some sauce, but not so huge that you end up with a mix of collapsed pasty bits and open sauce-bomb tubes; and the curved design makes them interlock in a way that builds structure.) Make sure not to overcook at all (keep them very much on the al-dente side), because they're going to absorb some more water from the sauce in the oven. If the pasta comes off the stove significantly before the sauce is ready (which is likely to happen), drain it, rinse with cold water to halt cooking, drop it in the casserole dish, and toss with just a little bit of butter or oil to keep it from turning into a solid mass; you need to be able to toss it with the sauce later, without having it tear apart into little bits.
If using some kind of meat (sausage, ham, bacon) brown it a bit in a large saucepan (1.5 qt) over medium-high heat, to get some of the oil out; remove the meat, add enough butter that you have a total of 3 Tbs of fat, and reduce the heat to medium-low. (If you're using bacon, you may not need to add any butter. We were using a lean sausage last night.)
Let the butter melt and sizzle a bit, then whisk in about 3 Tbs of flour (sprinkle it in while whisking -- too fast and it will clump, but you still want to be done in 15-20 seconds, so that you don't end up with too broad a spread on how cooked it is). The goal is to create a roux, a paste of equal amounts of flour and fat, that's still a little bit loose, but as you whisk it, leaves definite uncovered streaks in the bottom of the pan. Cook for five minutes. If you had pale-colored fat (such that the roux wasn't already colored to start with) you should notice the roux go from off-white flour color to a kind of blonde-ish color as the flour granules toast a little bit. If the mix starts to smell noticably toasty and you see a lot of black and brown grains, you've probably burned it and you'll be better off scraping it out with a spatula (you can still pour off some of the fat for use in other applications, but you'll want to to throw away or compost the excess -- do not put it down the drain where it can solidify into a pasty clog!), washing the pot, and starting over.
Add 1 Tbs mustard powder, 1 tsp paprika, 1 tsp salt, and 1 tsp nutmeg. Whisk to combine. (Feel free to vary the spices here. You could add a big spoonful of non-powder mustard here, or go in a totally different direction. Different herbs and spices are good with different cheeses.)
Gradually pour in 2 to 3 cups of dairy, depending on how liquidy you like your final product to be. (3 cups will create something that is more like "Mac with Very Cheesy Sauce" than Mac'n'Cheese. Xta notes in comments that if you're cutting down the dairy, you may also want to cut down on the amount of roux, but I wouldn't cut down more than proportionally -- so, 2 Tbs fat and 2 Tbs flour, for 2 c of liquid. The roux helps thicken the liquid; with less roux, you might end up with some stringy cheese, but have it floating in thin liquid, instead of having the liquid and cheese assimilated into one substance.) You can use skim milk, whole milk, or some mix of milk with half-and-half or cream. Last night we were using 2.75 c skim milk and 0.25 of half-and-half, but that came out more liquidy than we really wanted.
Add 1/2 cup finely chopped yellow onion (about half a medium sized onion), and a bay leaf. Allow to come to a simmer, uncovered, over medium-low heat, whisking frequently to make sure the flour doesn't settle out before it hydrates.
When it's been heating for about 8 minutes, get a small bowl and lightly whisk an egg (just enough that the egg and yolk are combined), then get a large spoon, and temper the egg -- drizzle in the hot liquid while whisking rapidly, until you have a mixture that's 2-3 times the original volume of egg. Pour that mixture back into the pot, again whisking rapidly. (The point is to get the egg to thicken the sauce, rather than turning into a scramble.)
Start pre-heating your oven to 350F.
Shred 12 oz of sharp cheddar cheese (or other highly-flavorful cheese; I can imagine an aged asiago or gouda being interesting). Melt ~3/4 of the cheese into the pot, in small installments (maybe an ounce at a time). (It's possible that if you're at the high end on the amount of dairy liquid, you could up the cheese to maybe 14 or 16 oz. It's already pretty darn cheesy, though. I'm not sure at what point you'd start seeing the proteins precipitate back out into curds.)
Fold the sauce into the macaroni. Top with remaining cheese. Toss 1 cup of breadcrumbs (if you go shopping for breadcrumbs, the "Japanese style" or "panko" type is generally a good idea, because it tends to have a more even grain size; alternately, you can make your own by drying out slices of bread in a warm oven or toaster oven and crushing it up, or crushing croutons; you can use the spikey side of a box grater, or a similar implement, if you want a fine texture and your bread isn't too hard) with a couple tablespoons of melted butter, and lay that on as a final layer. (Alternately, you can mix up the cheese and breadcrumbs as a single-layer topping, which will lead to more browned cheese on the top, but less crunchy crumbs.)
Bake for 25-40 minutes, depending on how brown and crunchy you want it on top. (If you let it go longer than 30 minutes, make sure to check in on it frequently, so it doesn't go from lightly brown to black in the two minutes you're not looking.)
Allow to cool (and firm up) for ten minutes before serving. Using a spoon or fork to open up a few "steam vents" may help this process; the melted cheese forms a seal over the top.
Add black or cayenne pepper to taste.
I had this for lunch earlier today. It's almost as good zapped in the microwave (2.5 minutes uncovered on 60%, so the steam doesn't waterlog the breadcrumbs, but the heat doesn't cause the edges to splatter before the inside is warm) as it was fresh. The sauce seems to be better about not separating than the typical cheese sauce. (The last time I attempted to reheat a fettucini alfredo, it didn't work very well -- I ended up with fettucini with little sticky cheese curds adhering to it, in a puddle of oil. Still edible, but not all that appetizing.)