Mixed use zoning and some rules on what businesses can open would go a long way. Where I live I can walk to a small downtown that spans a few blocks with a train station. Unfortunately there is no where to buy groceries. There's like 3 ice cream shops, 3 pizza joints, and 9 salons though.
Grocery stores are pretty low-margin, and need a certain amount of demand (for the size Americans are used to).
Some convenience stores get moderately close to being a grocery store.
It'd be an interesting experiment to see how few products you could carry (and of course, only one of each type) and have people still willing to shop there.
American-sized grocery stores are relatively new though. When I lived in Germany downtowns had plenty of smaller, specialized stores. There'd be several small butchers, small bakeries and sometimes even a fish monger. Stores that carried produce would usually beer less specialized but there still would be plenty of small ones like Spa and Edeka used to have small locations in walkable areas. And of course proper markets at various frequencies.
We have a very large number of grocery stores. They just aren't in walking distance of the downtown area. So there's demand, but apparently not enough for a bodega with produce.