I have gone both ways Brian, depends on the situation but my preference typically is to research and engine, buy it first and then whatever appropriate cars. I purchased some years ago a Seaboard MTH Premier E8aba engine set, Citrus light green paint scheme which I have not often seen out in the market place. After getting the engine and some further research, I found that Seaboard often ran this engine with all Pullman green heavyweight cars. I just put together both a Lionel and MTH set recently so I can run 11 of the 18" heavyweights similar to pictures I have. Nice thing is they ran this engine in it's later years with mixed boxcar trains too so both sides of the track are OK.
Mark