No, it cannot be used for just any kind of food and the word can be used for adults, too.
買い食い, despite its pretty straightforward look "buy and eat", carries a fairly negative connotation for us native speakers. Moms hate it if kids do it often (because they do not get to know what the kids are eating). The word is never used to describe buying a "serious" or "full-size" meal. It is all about buying snacks to eat between meals. Takoyaki, mentioned by OP, is a prime example.
While it is true that mostly kids do the 買い食い, it is absolutely Ok to use the word for adults when they buy and eat snacks. Adults may use the word in self-deprecation when they do the 買い食い themselves and use it kiddingly when other adults do it.
Finally, the word is NOT used when you buy a snack and bring it home to eat it. You need to eat it near where you bought it to call it 買い食い, which is why moms hate it.