For the chopped onion, you can also chop onion, then lay the bits out on a cookie sheet and pop it in the freezer. Do a few sheets at a time if you have enough onion. Then, once they are mostly frozen, you can dump them all into a large freezer bag and you'll have ready-to-use frozen onion that won't stick together in clumps. This is a great way to store onion if you have a large garden and produce more than you can use right away. You can do the same thing with entire slices.

Alternatively, GFS (Gordon Food Services) sells 5 pound bags of diced onion and diced green peppers. You can buy those, divvy the contents into smaller bags, and freeze everything.