Contrary to what most people think, you can have a planted tank with
Goldfish. My first choices are
Hornwort,
Duckweed,
Water Sprite, and anarcharis. I have all those in my
Goldfish tank. My favorite is the
Hornwort; it grows like a weed and really helps keep the nitrates down. Other good choices are
Java Fern and
Anubias (my
Goldfish did nibble on this one). These are just the plants that I have used with my
Goldfish. Other more adventurous people have used different plants like
Java Moss, crypts, swords, and vallisneria. I have no experience with them. I no longer have the
Java Fern and
Anubias because they like to be attached to driftwood and driftwood softens the water.
Goldfish like harder water with a pH about 7.0.
The key to preventing
Goldfish from eating plants is to provide plenty of greens in their diets. They might still uproot them, but you can plant the plants in small terracotta pots to stop the uprooting.
For
Koi, I don't actually keep any plants in the pond with them. But I have iris, moss, pitcher plant, and some others in the pond. I can't remember them right now because most of them are in hibernation.
Duckweed can also be used in a pond, but you'll probably be skimming it off the surface almost daily. Lily pads are also nice, but only if you have enough sun on the pond. For some other plant choices you might want to contact a local nursery.