There are positives and negatives on almost every year CTD out there. Your best bet is decide what you want to spend overall (after you figure in the thousands you WILL be eventually spending on BOMBS

) and go from there. You should try to find yourself a truck in the best possible condition in your price range. A good maintenance history is probably more important than mileage as far as the engine itself is concerned. However, overall mileage is a consideration for the rest of the truck (suspension, steering, brakes, common wear items, etc. ).
I currently own a 24 valve 2nd gen truck... so I'll give you some ideas on these trucks specifically. Someone else will have to help you on the others.
1) The lift pump is a common failure in the 98. 5-2002 trucks. Lift pump failure of one cause or another can lead to a VP 44 (injection pump) failure. A dead VP 44 is an expensive fix that you probably don't want to face. A simple fuel pressure test can give you a rough idea on how the LP is functioning. There are many good fixes for the LP problem... do a forum search on the topic for some interesting reading.
2) Some of the late 90's up to the early 2001 trucks were delivered with what is referred to as a #53 block. It is a block casting that has shown a history of cracking on the lower passenger side of the block. A #53 block is easily identified by a large "53" cast into the front of the block a few inches above the oil pan. Not all #53 blocks have or will crack, but it seems to be a higher percentage of failures in these. Now I have a 2001 that I bought new with a 53 block. I have convinced myself to just enjoy the truck and not worry about it, but you may want to consider this in buying a used vehicle.
3) Many 2nd generation trucks have had problems with the steering/front suspension components. Do a search on track bar and you will have plenty of hours of reading there.
Overall the 2nd gen trucks are excellent units. The items I listed are probably some of the major issues that you want to think about.
Hope this helps
Justin