you're possibly thinking of a multiple entry visa, each entry allows x days and you must exit the country by that time, you can then re-enter Thailand if the visa hasn't expired and you are stamped in again for x days. For non Imm visa it's 90 days stamped in, for METV tourist visa it's 60 days.
there is a multiple and single re-entry permit, there is a visa with multiple entry, no extensions come with reentry permits these are bought seperately from the extension, there is NO multi extension.
multiple re-entry permit 3800 baht, single re-entry 1000baht.
I don't believe you can get a single entry OA, afaik they are all multiple entry 1 yr visas. possible mistake on embassy website of which there are usually plenty.
let's say your multi entry visa expires tonight at midnight. You could go in and out of Thailand every hour until midnight and be stamped in for a year each time. Of course it would end up being the same date a year in the future. So if you want to go out after midnight, your visa has now expired and you're on a permission to stay stamp, you'll need to buy a re-entry permit before you leave to keep that 1 year permission alive, otherwise without it the moment you stamp out you end your 1 year stay permission.
no, not before the visa expires its multi entry, before the extension expires, your visa let's say is already expired. Say your visa expires this May 1st, on April 30th you re-enter/return to Thailand and get stamped in till April 30th 2023. The next day your visa expires, so now if you want to exit and return to Thailand any time before April 30 2023 you'd need a re-entry permit to keep your April 2023 stamp alive. You'll need to buy a reentry permit every time you renew your yearly extension or just before you leave Thailand.
Ask a final note, after your last entry before the visa expires, you would need to get a reentry permit to keep that 1 year permission stamp alive. When your year is up if you get another extension you will need to buy a rentry permit again if you plan on leaving. You can buy a multiple or single entry permit.