Preheat the oven to 425°F (220°C). Lightly butter or grease a 9x13-inch baking dish.
Bring a large pot of generously salted water to a boil. Cook the pasta 1–2 minutes shy of al dente, since it will continue cooking in the oven.
Reserve about ½ cup pasta water, then drain the pasta and set aside.
Meanwhile, melt 3 tablespoons butter in a large saucepan or Dutch oven over medium heat.
Add the flour and whisk constantly for about 1–2 minutes, until smooth and lightly golden. Don’t let the roux become dark.
Gradually pour in the warm milk while whisking continuously to prevent lumps.
Cook for 3–5 minutes, whisking frequently, until the sauce has thickened enough to lightly coat the back of a spoon.
Reduce the heat to low. Stir in the pumpkin puree until completely incorporated.
Remove the pan from the heat. Add the cheddar, Gruyère, and fontina a handful at a time, stirring until melted before adding more.
Season with salt, black pepper, and cayenne, if using.
Add the cooked pasta and toss until thoroughly coated. If the sauce seems too thick, add a splash of reserved pasta water. The mixture should look slightly saucier than you think it needs to be, because it will thicken in the oven.
Transfer the mac and cheese to the prepared baking dish.
In a small bowl, combine the panko, melted butter, thyme, and Parmesan, if using.
Sprinkle the panko mixture evenly over the pasta.
Bake for 10–12 minutes, until hot and bubbling around the edges.
For a more deeply golden topping, broil for 1–2 minutes at the end, watching carefully.
Let stand for about 5 minutes before serving.