I would like to create a package that will create a custom structure, like create-react-app does to create a react app. Is there a way to do this?
For creating a template you just need to host your code (like github) and reuse it.
But I assume you want to build a template for CRA, see Building a Template in docs.