Cooking one food inside another would seem to be one of those obvious ideas. People put a stuffing inside a roasting bird or animal in country after country, and it's the most common thing in the world to stick something into dough before baking it.
Stuffing vegetables is a little less obvious. Leaves, sure -- before there was aluminum foil, people often wrapped things in leaves to make a convenient cooking package, and sooner or later they were bound to come up with the idea of making the leaf the focus of the dish, as in stuffed cabbage or grape leaves. The Greeks were making thrion, a dish of fig leaves stuffed with sweetened cheese, thousands of years ago.