This is only doable once you have obtained 25 research points for both zerg and protoss. I'm not sure what the earliest possible mission is that you obtain this but once you do you can get every upgrade right there.
If you go back to an earlier mission that you can get research points on "even if you've already gotten them" you can get them again and trade them in at the research console for credits.
I've found that the fastest level with the most research points is the protoss level "A Sinister Turn". I am able to complete this level in about 5 minutes. After each 5 minute run you will obtain 250,000 credits from the research console. Do this as many number of times it takes you to get as many upgrades as you want.