Say I'm attempting to write a sound, as in 'poof', 'thud', or 'clank'. What's the correct convention to write something like this? Is there one, or is it a grey area as long as it's clear to the reader?
You might consider looking in the dictionary first:
poof 1 |po͞of, po͝of|(also pouf )
1 used to convey the suddenness with which someone or something disappears: once you've used it, poof—it's gone.
2 used to express contemptuous dismissal: “Oh, poof!” said Will. “You say that every year.”
a dull, heavy sound, such as that made by an object falling to the ground: Jean heard the thud of the closing door.
a loud, sharp sound or series of sounds, typically made by pieces of metal meeting or being struck together: the groan and clank of a winch.
If you don't find it, you can just make something up. But include some context, or you risk not being understood:
She dropped into the chair with a plooomp.
If we hadn't been told what was happening here, we might not be able to determine what the ploomp sound signified.
I think there's a slight difference between your title and your question. Onomatopoeia refers to actual words: clank and thud are both in the dictionary, and there is no reason to write them differently because of their origin. Sounds that are not [yet] words are usually put in quotation marks if made by a person ("Aaagh!") or italicised if not ('The snow made a soft plomp as it fell'). Bear in mind that "The cat meowed", "The cat said "Miaou"" and The cat made a meow of agreement" all refer to the same action, but with different emphasis.
Grammatically, onomatopoeias are verbs, nouns, or interjections:
The cat meowed.
It landed with a dull "thud."
Tic-tic-pomp! The man's fingers fell on the wet pavement with a shower of blood.
Typographically, onomatopoeias present the same choices as thoughts: Set them normally, quoted, or italicized. Style guides recommend using one style consistently, whichever you choose. But set verb onomatopoeias as normal text, especially if they're common words.
EDIT: Notwithstanding the source, it's good practice to set all onomatopoeias as normal text – it maintains consistency between verb and other onomatopoeias, and doesn't require you to make a clear distinction between onomatopoeias and other words.