Is there a way to add people and thank them inside answers? In this question I wanted to thank TimB for improving my answer but writing "Thanks to .." didn't seem correct.
No, there isn't (other than by typing there @name, but this won't notify them).
In general though, thanks are not required. We like to keep the signal-to-noise ratio high here, so anything that detracts from the content of the post is discouraged.