It likely depends on what 'turning bad' means ...
If you have a couple in the bag starting to sprout, but the rest haven't, you can roast or bake the ones that haven't sprouted, let them cool, then store then in the fridge so you can pull them out to use them in something later in the week. (eg. home fries, patatas bravas or a hash).
For those that have started to sprout, but are still firm, you can cut away the sprouted bits (this time of year, you might even be able to plant them), peel them, and then boil them and turn 'em into mashed potatoes (which you can then vary for the next couple of days ... you can mash 'em with other stuff to make a sort of potato salad; you can add cooked greens to make colcannon or bubble and squeek; you can use as a topping for a cottage pie (the technically correct term for shepherds pie when you're not using mutton or lamb)
Some of these freeze well ... I've made up cottage pies and frozen 'em in oven-proof containers; you could likely do the same with just mashed potatoes -- I see 'em for sale in the grocery store all the time.
If you're looking for something to cook that just uses a lot of potatoes (in a non-whole state, in case you need to cut away parts) ... potato salad, potato bread, potato curry, latkes, potato soup, tortilla de patatas ... the list goes on.
... and if they're soft and squishy, or oozing liquid ... pitch them. They're rotting, and not worth getting sick over.
It's a vegetable. When you cooked it you damaged the cell walls and the juice is leaking out.
I think this picture only seems unusual because of the beets' color. If these were carrots there wouldn't be a question because, of course, the juice would be less startling.
If these beets haven't started to mold or ferment- and you'd know it from the smell- then they are fine.
Best Answer
First, you have to distinguish between food safety issues and other ways of food "going bad". The likely thing is that your avocadoes were safe to eat (= not full of pathogenous bacteria) on the day you threw them out.
However, people cannot tell when food is full of bacteria, and tend to throw it out when it is too changed from its original state. Or they dislike the taste and texture of the changed state. This is common with fruit and vegetables. They are still alive after being picked, their metabolism goes on, but many of the necessary nutrients and water aren't delivered by the roots and stems any longer. So they change their color, taste and texture, and become mushy, wilted, or black,or change in other ways which people dislike, so they proclaim the produce "spoiled" and throw it away.
If this is what happened to the avocadoes, there is a good chance that making it into guacamole would have let you enjoy the avocadoes a day later. A pureed avocado doesn't metabolize the way a whole avocado does, and the changed pH and other ion concentration (salt) changes the chemical reactions going on in the cells. It is now no longer a living fruit, but prepared food. The pH and cold storage also inhibit mold from growing, which can happen on ripe fruit held at room temperature.
This is something specific to avocadoes and guacamole and not a generic statement about mixing random ingredients, you cannot make such generalizations in principle.