One minor point. When returning to Chiang Mai on a re-entry permit, I was pulled up by an IO for incorrectly putting my visa number in the space on the arrival card entitled 'visa number'. Apparently, this should show the re-entry stamp number. He made the amendment for me.
TLDR : Answer Summary
When entering the 'visa number' on the arrival card (TM.6) in Thailand, one must use the re-entry permit number if they are holding a re-entry permit rather than a visa. This distinction is important as the visa number and re-entry permit number are different, and failing to correctly identify which number to use may result in confusion with immigration officials.