Making entries generic using a word processor so that they will spawn different types of ships is easy in itself - I will explain some of it later (I have to study right now). The hard part in this case (at least as far as I can see) is determining which of the many campaign files will support generic entries. In SHIII, the random layer would easily do so, while the scripted layer would crash unless a class name was specified.

In SHIV, the only campaign file type which can definitely (as far as I know) support generic entries is the 'merchant' type - these already have lots of those entries, except for the "other nations" ones.
I'll give you a quick lesson. Open one of the campaign files (I always use WordPad) and find an entry like class=KSQ. Put a semi-colon in front of the line, so it looks like ;class=KSQ. Now, instead of choosing the Split-Superstructure freighter (or whatever KSQ is in SHIV - I don't remember right now), the game will choose one of any of the type 102 (Cargo) vessels assigned to whatever nation the entry is for. That's pretty much the basics of it. Make sure you make a backup file of course. Also, using the find and replace options of whatever program you choose to edit the files can make things go faster.
Adding entirely new entries and new traffic for other nations is trickier - I'll let someone else explain that.