What is needed to mirror both an iPad and a late-2016 MacBook Pro to an HDTV (non-concurrently)?
Do you happen to have an Apple TV?

If so, that would be how I'd do it, using Airplay.

If not, then any Apple TV (2nd generation and above) supports Airplay and you already have the cable (i.e. HDMI to HDMI) that you need to connect it to your HDTV.

The advantage of this is that you also get all the benefits of having the Apple TV as well, not to mention the fact you won't have your iPad or MBP tethered with a cable (or cables) to your HDTV (i.e. the mirroring happens via WiFi and you're able to have the iPad or MBP anywhere you want while mirroring).

If your question is about connecting these devices to any HDTV that you may need to connect to (i.e. not a single one at your home, but to various models in various locations) or you do not want/need an Apple TV, then I'm not aware of a single solution that will pass both video and audio from both devices, but perhaps someone else will have a solution.

[EDIT]

Just checked and Apple are selling refurbished 3rd generation Apple TVs for $59. At that price, it'd be hard to warrant spending the money on cables and/or adaptors, unless you intend to carry them with you in your travels.

You can also buy brand new Apple TV 3 units from places like Target who still have them in stock (since they've been superseded).