Minecraft doesn't support outputting audio via a specific audio device. With the diversity of the actions whose audio you want to send to your TV you're probably going to experience issues making it work as you want to.
For watching movies or TV shows that exist as data on your PC, you could swap the media player you're using to one that supports outputting audio to a specific device rather than the Windows default device.
This would mean setting your PC's audio device as the windows default device so that Minecraft uses it, and then manually setting your media player to use the other audio device.
VLC supports outputting to a specific device using the "DirectX Output" audio module, available under audio in preferences. This would allow you to play media files and output audio to your TV while running Minecraft outputting audio over the default sound device.
This won't work for YouTube however, and web browsers, like Minecraft, do not have the option to output to a specific audio device, so there wouldn't be a workaround for this.