Actually, "on" and "in" are prepositions that always need an object. The rules of grammar demand that you use a word like "it" after them. If you don't want to include objects in your example sentences, don't use the prepositions:
A table with a lot of food.
A box with only a few things.
OR
A table with a lot of food on it.
A box with only a few things in it.