It is very thoughtful to thank individuals for their kindness following a loss. Sympathy thank you notes are very personal and what you say depends on how you feel about writing the notes. Some individuals create a template and use the same format for all notes; other individuals write more personal messages and use the experience as an outlet for their grief. Either way is fine.
You can say something simple, for example: "Thank you so much for the flowers in Charlie’s memory. It was a very thoughtful way to remember him. Your kindness is appreciated." You can add: "Your caring gesture was helpful during this difficult time."
If you want to write more personal notes to friends, neighbors, or colleagues you can certainly let them know your loved one mentioned them many times and their friendship meant so much to them. Or, if individuals shared stories in their notes, you can let them know how much their note and thoughts of your loved one meant to you. Whatever strategy you take is fine; the most important thing is that you’re acknowledging others' kindnesses. And you are doing it for your loved one.