If you mean to apply for a visa before you visit Thailand, like the retirement visa as in application for a new Non Immigrant O or O-A or O-X visa, please look at the requirement of the Thai Embassy in the country where you apply.
I hope you can understand that we can not tell what an unknown Immigration Officer at an unknow immigration booth at an unknown international airport in Thailand on an unknown date will do. For sure we can tell he will do his job, if that is with or without asking a question is his/her personal decision.
IF you got an Admitted to stay period of 30 days it is called an Visa Exempt Entry, NOT a Visa on Arrival which some countries need to buy for 2.000 Thb and only give 15 days of stay.
Yes, if you re-enter by land you get a new 30 day Visa Exempt Entry but can only do this twice a calendar year.
And that is it. Yes, we know that a Thai Embassy makes money with the sales of a Visa and they not get any income by telling you that Visa Exempt Entry is possible.
I close the post before more people are going to share what the embassy posted in what ever country.
The Royal Thai Police Immigration Bureau sits at entry points at land borders and airports and they decide if you may or may not enter Thailand.