My question is this - Are these loaded on boot and taking up system RAM ? or are they only accessed "as needed".
They are loaded as needed, i.e the latter. A library not used does not take system ram.
I would think that the 68040.library would be used all the time
If you have an 68040 on board, yes. Otherwise, no.
Same things go for datatypes...if I am not opening up an mpeg does having the datatype in the devs folder actually use memory ?
It will be loaded once the system needs it, and then will be loaded to system ram. When it is decoding a codestream, it will take additional RAM for the codestream. This Ram is returned (hopefully) once the job is done, though the datatype will be kept in RAM until the system runs low on memory. At this stage, it will be flushed out to make room for more important resources.
I.e., it makes no sense *not* to put additional libraries and datatypes on the system. As long as they are not needed, they don't add to the system RAM. Plus, they will be removed from the system ram if running low on memory.