For example - you have multiple offices: HQ-office and branch-offices, each office have piblic IP and private subnet.
Very simple solution:
HQ-office Mikrotik (master) and branch-offices Mikrotik (slave) have this table:
public_ip, private_subnet
1.1.1.1, 192.168.1.0/24
2.2.2.2, 192.168.2.0/24
.....
99.99.99.99, 192.168.99.0/24
Slave periodically download this table from Master (or Master upload to Slave).
When any Mikrotik get packet to some subnet, he look in table, and dynamically create tunnel to office and create route to office (all this happens automatically).