A. What generates each waybill/car assignment?
Are you asking about how you put the destinations on the waybills or how you choose which waybill is matched with a car?
The waybill shipments are matched based on the industries on the layout and what they ship or receive.
What I've done is make up a table where I list all my industries, then all the commodities those industries receive then all the commodities those industries ship. I then add what car types those use. I then match up sources for the commodities received and destinations for the commodities shipped.
I have a steel mill. It received ore, and coal in hoppers, scrap and pig iron in gons, and ships boiler plate and "boat plate" in flats and gons.
Where would the iron or come from? Probably the ore docks along the great lakes. Where would the coal come from? Mines in central Pennsylvania. Where would boiler plate be shipped to? Industrial cities along the east coast. Where would boat plate be shipped to? Shipyards along the east coast. You can make up companies for origins and destinations, use other industries on the layout or do research on where they actually were. I model the Reading so I have lists of hundreds of coal mines along the Reading. I know were many of the shipyards were and I have a shipyard on my layout.
I have a waybill for shipment of coal from RC&I in Locust Summit, PA to the steel mill. I have waybills for boat plate from the steel mill to H&H in Wilmington, DE (the shipyard on my layout) and to the Philadelphia Navy Yard, the Brooklyn Navy Yard and Sun Shipbuilding in Chester, PA. If I don't know an industry I might use "Acme", since from the Roadrunner cartoons, Acme was the Amazon of the 1960's, selling just about everything.
Once I get the waybills set up and I have multiple waybills for different car types and multiple waybills for each origin and destination, I assign a waybills by basically picking one that is appropriate and then using that one for the shipment. After its completed I swap it out for a new one.
B. How do you ensure you aren't mixing things up and prevent your boxcars from somehow taking coal loads or your hoppers from taking pulpwood?
Because I was taught to read? You are creating the waybills. If YOU write a waybill that puts pulpwood in a hopper, that's YOUR fault. You are selecting the shipments for each car. IF YOU pick a waybill that puts pulpwood in a hopper, that's YOUR fault. Each car card has a car type on it. Each waybill has a car type on it. Its a Garanimals thing. If the waybill says its for ca type "LP" (pulpwood flat) and your car card says its a car type "HM" (twin hopper) they don't match. A waybill with a car type LP goes with a car card with a type LP.
Both switch lists and car cards have the "paperwork" track the cars, if the paperwork and the cars get mixed up its can cause things to get mixed up.
There are other systems I have used on modular layouts and clubs that are less car specific. You can develop a list of industries by station and then the car types each industry uses (a spreadsheet program like MS Excel works great for this).
Option 1. You mark the list for the number of cars for that industry. In the yard, you switch up that number of cars of the types listed for each industry (switcher's choice). If an industry uses boxcars and hoppers and gets 2 cars, the switcher can dig out a boxcar and a hopper or two boxcars or two hoppers. The local crew run the train and then at each industry spots appropriate cars and picks up the same number of cars.
Option 2. You mark the list for the number of cars of each type you want to spot at that industry and how many cars you want to pick up at that industry. The switcher switches out that number of each car type and builds a train. The local runs and spots those car types and picks up the number of cars indicated on the list.
Another option is tag on car. You make coded tags (colors, letters, numbers, symbols, etc) for each industry. You put tags on each car you want spotted and a "pull" tag on each car you want picked up at industry. The switcher switches out the tagged cars and builds a train, the local spots the cars according to the tags. Very simple, but many people don't like it because the tags on top of the cars distract from the "look" of the train. When the session is over you collect all the tags off the cars. Next session you put them back on whatever cars are available.
All of the above systems are switching by car TYPE or number of cars. It really doesn't car which boxcar, just that a boxcar is spotted. So that system doesn't care what cars are where, if something gets moved between op sessions, it really doesn't matter, and all you have to worry about is switching just the areas you want to switch, it doesn't require tracking every car on the whole railroad.