I know this sounds quite strange, but here on Stack Exchange (S.E.), people generally prefer if you do not thank them. Evidence of this can be found in the commentary guidelines of the help center which discourage compliments, and more concretely the network's meta thread Should 'Hi', 'thanks', taglines, and salutations be removed from posts? They consider it a distracting chatter which detracts from one of the stated purposes of the website in the tour.
This site is all about getting answers. It's not a discussion forum. There's no chit-chat. [emphasis my own]
You can read some more of the details regarding why S.E. is not considered a discussion forum in Are Stack Exchange Sites Forums. However, obviously, nobody can speak for everybody, and perhaps you have reason to believe a certain user would appreciate a personalized thank you. This is more likely to be the case, since the thank you taglines are disliked in large part because they are impersonal.
In that case, you might be able to contact specific users in chat, if they have participated in it before. This is the most appropriate option you have on this website, because chat is meant to be a more social (albeit "still roughly on-topic") environment than the rest of the website. However, please do exercise discretion while doing this, because the website is intentionally designed not to have a personal messaging system.
Some users may also include alternative contact information, e.g. an email address, on their profile if they are especially receptive towards receiving messages from other users that you might be able to use for writing a thank you letter, or whatever else you may want to communicate with them. You can check to see if that is the case by clicking on the link which attributes the post to their username. I do not believe there is a specific field for this, but it may be included in the About Me section of the page.
Also, all editors are accredited with their edits in the editing revision history found on the bottom center of posts.