thanksFor the top solution, I'd go with an Nvidia Shield TV. For a cheaper alternative, I'd recommend Xiaomi Mi Box.
Nvidia Shield is quite powerful as a box and would do 4k HDR just fine. You can use USB to attach an SSD or use network storage (NAS).
The Xiaomi will be a lot less expensive and they usually keep it updated. It does all the same things, but it might struggle in very high bitrate (50mbps+).
For your media solution, as an android box you have access to Kodi, Plex and Emby, any of witch can be used for this.