I read on https://bangkokpost.com/thailand/general/1891790/govt-temporarily-blocks-all-travel that the Thai government will temporarily block all inbound travel. Can the Thai government legally ban Thais from entering Thailand?
The Section 34 of Constitution of the Kingdom of Thailand says (highlight mine):
[…] No person of Thai nationality shall be deported or prohibited from entering the Kingdom.
The referenced document points to the most recent 2017 Constitution.
So the naive answer is No, however some legal gap may be found by the Constitutional Court (Section 27).
More specifically, it would depend on the legal equivalence of terms "Thai citizens" and "person of Thai nationality".