How to download and unpack / install plugins with templates when installing it

Hi and welcome to WPSE.

With templates I assume you meant themes.

First off, please read this one.

Especially this chapter:

Finally, if you’re working with someone else’s code, you have 0 control over when they ship new releases, if they introduce bugs, or if they’re hacked. So don’t automatically install code for which you can’t claim responsibility.

To enforce that, you should be careful to even encourage to install plugins which you can’t claim responsibility for.

If you however do you considerations and want to recommend others plugins, I’d suggest you to take a look at existing solutions in that direction:

F. ex. this is a relatively widely used one: http://tgmpluginactivation.com/

However, consider carefully what kind of plugin and theme dependencies you are introducing, and do at least a superficial code review on the dependent plugins.
Experience about WP plugin and theme lifecycles is a golden asset when doing these considerations.

Nobody likes the dependencies to outdated plugins and themes, or even worse, hacked ones.

Also make sure your theme works even if the site admin doesn’t install & activate all recommended plugins.