One time, in band camp, no, I think it was in the restaurant supply store, I found a 2 pound bag of chopped onions for something like $1.49 on sale. I took the bag home, split the chopped onions into 1/2 cup portions and put each 1/2 cup into sandwich bags, put them all into a big ziplock bag, and froze them. Then, when I needed chopped onions for a recipe, I just pulled out the required quantity. In small batches they thaw out in less than an hour on the counter, so even with very little planning time, I was still good to go.
Oh, and I never noticed the difference between cooking with prechopped, previously frozen, thawed out onions and fresh ones. Just be sure to drain and dry them thoroughly before throwing them into hot oil!