Melt the butter in a large skillet over medium heat.
Add the onions, celery, and carrots. Cook uncovered, until the onions are soft and translucent. About 5 minutes.
Add the minced garlic and cook for an additional minute.
Add the turkey, corn, and green beans (or peas) in addition to the salt, pepper, and thyme.
Gently stir in the gravy: If preparing a packet of gravy, cook that separately according to package instructions. Once thickened, add it to the skillet.
Once the mixture is heated through, pour it into a one-quart casserole dish, spreading it into one even layer.
If using leftover mashed potatoes, heat them a bit to make it easy to stir and spread. Add half of the cheese to the potatoes and stir to combine.
Spread the potatoes in an even layer over turkey mixture and top with the remaining cheese.
Cover and bake for 30 minutes. Serve warm, and enjoy!