@Jennifer ****************
if you have rest days when you exit Thailand you can buy a re-entry to keep them for your next entry.
you maybe are not able to get a visa on arrival - only certain countries get that.
you can't get a Tourist Visa during you are in Thailand if you will not come back from your home country.
every time you are arriving at Thailand without an active visa you can enter visa exempted for 30 days and do an extension inside Thailand for another 30 days.
you can enter Thai land borders visa exempted 2 times a year.
you can apply at your trips to neighbouring countries for a single tourist visa at the thai embassy/ consulate there.
this will give you 60 days at Thailand possible to extend for another 30 days at immigration offices in Thailand. So 90 days.
Mix all that to your requirements.