You can cook this in a 1 quart casserole dish or a cast iron skillet. I prefer the skillet method myself.
If you cooked the onions in the same skillet you are going to cook the cheesey potatoes in, then you don't need to butter the dish quite so much, and you don't need to the clean the skillet out. Remove the onions from the skillet and then layer the potatoes and onions back in as you normally would.
I generally use whatever cheese remnants I have in the refrigerator, which usually consists of Kerrygold Dubliner, English Coastal, Parmesan, Welsh Collier's, and so forth.
You can bake the potato dish uncovered but keep an eye on the browning. If you find the dish is browning too quickly, reduce the oven temperature to just 350F/175C