Yes, these are correct sentences. I will make a few notes below to try to explain clarity.
1. My favorite TV show is a cartoon. (I like a specific cartoon) [This is correct]
2. My favorite TV show is the cartoon. (I like a specific carton or my favorite type of TV shows is the cartoon)[This does not sounds very natural and will be the least used. You can say "My favorite TV show is the cartoon [name of cartoon here].
3. My favorite TV shows are cartoons. (my favorite type of TV shows is the cartoon [this can also mean that you have several favorite shows and they are all cartoons])
I hope this is helpful! Good luck.