In web apps, there is an analysis widget with an "extract data" feature.
I recommend reading this documentation on the widget.
https://doc.arcgis.com/en/web-appbuilder/create-apps/widget-analysis.htm
Note that the widget doesn't allow the user to save files locally to their machine. They must have the ability to publish content in AGOL since it will be saved under their "My Contents" tab.
If I'm misunderstanding and this isn't the case, and there is a way for end-users to be able to download KMZs or Shapefiles locally to their machine, I'd love to know!
Best,
Katie
“The goal is not simply to ‘work hard, play hard.’ The goal is to make our work and our play indistinguishable.”
- Simon Sinek