I'm just an M1 but I'll give it a shot.
Transitional and preliminary programs are similar in that they are essentially only an internship / the first year of residency, and not a full residency in and of themselves. These programs are usually pursued by people who have matched into certain residencies that require them, such as DR, anesthesia, derm, and ophthalmology (I think?). You basically finish your prelim/TY, then start the residency that you matched into and intend to pursue.
Transitional years programs with a broad focus, where you rotate through a number of different areas. Prelim years are either in Internal Medicine or Surgery.
The ideal thing to do is to match into your desired specialty and your TY/Prelim during the same match. However, some people don't match in their desired specialty or aren't competitive enough for it, and either SOAP or match into a Prelim without having anything set up for after the Prelim.
In this sense, prelims are not very competitive. People who match into a prelim alone (without a residency lined up to follow it) are generally there because they didn't match. A prelim is a backup for these people, because they hope that they can apply for the match again directly into the advanced program after they finish. Sometimes an advanced spot opens up in the desired field and it can be finagled to move directly into that spot.
Basically, prelims are either a necessary part of training, or a backup for people who didn't match.
I'm not too sure about TY's being used as a back up because I think they are generally more competitive than prelims. Same thing applies though - these aren't necessarily full residency programs.
As for your planning, you definitely want to aim for a Categorical spot. If you want to go into DR, you'll have to do a prelim, but finding a prelim isn't the hard part. Having the advanced spot lined up is. If you don't get one in your desired field, a prelim is something productive to do to kill the time until you can apply for the match again.