Do I need onions when making thai curry paste? or can I just add onions to the dish I'm cooking later with the paste?
If the mortar size vs volume of ingredients is truly the only concern, you can crush things in batches and mix them in a bowl afterwards. :-) 

I think the main reason for adding them into a prepared paste is for convenience in adding that paste to recipes later. If it has everything you need already in it, then it works better as a base. If it doesn't have everything in it already, you will have to make sure you have more ingredients on hand later when you're preparing the recipe. If you're making the paste and using it in the same cooking session then this doesn't make any difference at all.

Adding the onions to the paste vs adding onions with the paste won't affect the flavor as long as you add them at the same time.

If you add the paste early in the cooking and the onions significantly later in the cooking then that can affect how thoroughly the onions get cooked and how well they impart their flavor to the sauce.

Also, if you are storing the paste for some time in the fridge, the flavors of the various ingredients may change a little over time, and onions in particular might mellow somewhat, but I don't think they would change significantly enough to matter for the end result. This is just where you get into the convenience factor -- if you have added the onions already, your Thai green chili paste is a complete ingredient in itself and you don't have to worry about having the shallots on hand as well.