We've been doing onions like this for years. Recently, I changed our method. Instead of wrapping each onion in foil, I now put several (5 or 6) in a metal 8" cake pan and top it with foil. I totally peel the onions but using two pencils on each side, I cut slits into each onion -- usually into eighths -- without cutting all the way through each onion. Yesterday, since we were having them with grilled rib eyes, I put a small dab of Better Than Bouillon Au Jus flavor on each one, put a sliver of sliced garlic into each slit, poured about 1/2 teaspoon of EVOO on each and then topped with a mixture that I chopped up of fresh parsley, fresh thyme leaves and fresh oregano leaves. I pushed that herb mixture down into the middle somewhat with my fingers but left some on top of each onion, too. Between the whole onions in the cake pan, I put wedges of fresh tomatoes and of course, put smoked salt and freshly grated black pepper on everything. We find it's easier to not deal with a little cup of foil holding very hot liquid when we wrapped them separately in foil. And they are delicious.
I had some leftover tonight so I cut all the onions and tomatoes into small pieces and used them and the accumulated juices in the cake pan over some al dente buccatini pasta. Delicious, light and bright. And low cal and low fat, too.