Melt the butter in a large skillet over high heat. Add the onions, cook, stirring for a couple of minutes to coat the onions with the butter. Turn the heat down to medium-low and continue cooking, stirring often until the onions are beautifully browned, about 20-30 minutes.
Meanwhile, in a Dutch oven, cook the pasta in salted water until al dente according to the package directions, about 9-10 minutes. Drain and return to the pot; cover and set aside.
Add wine to the onions, scraping up any bits allowing the wine to evaporate. Add garlic, when fragrant, add the beef broth and cream, bring to a boil, reduce heat to low and simmer until slightly thickened, about 5 minutes.
Preheat the oven to broil. Butter a 9x13-inch baking dish and set aside.
In a small bowl, toss the shredded cheeses together, reserve 1 cup cheese for the topping.
Pour the remaining cheese and sauce over the pasta. Gently stir to combine. Pour it into the prepared baking dish. Sprinkle the crispy fried onions over the pasta and top with the reserved shredded cheese.
Place the mac and cheese under the broiler. Broil until the cheese is melted and golden, about 2 minutes, watch carefully or it will burn. Garnish with more thyme and black pepper if desired before serving.