I've cooked canned stuff before. But at the time, I had a Freightshaker that had two bars that crossed laterally, right over the flat Cummins valve cover. With some chicken wire and baling wire, I made a nice little basket. I told the mechanics I used it to carry rags for the dipstick, but actually I used it as an oven.
A very slow, ... very slow oven. Good mostly for heating up soup, beefaroni and spaghetti-o's and cans of corn n' stuff but if the truck is moving, it doesn't get hot enough to bake potatoes or anything like that.
And don't try a Rotella-mesquite steak that way, because even if you wrap it in foil, the drippings get all over the engine and it attracts bees.