I would like to know if theres a way to add a new page(html/php) to a moodle theme that work with the same logic of the default pages(layout -> templates).
Moodle Version: 3.2.1
Not 100% sure what you are looking for but perhaps one of the following could be useful:
Take a look at the Page API
https://docs.moodle.org/dev/Page_API
You can see some examples in the Flexibase theme and I believe Essential has some and possibly a few other themes too.
Richard