In English I can change "what the heck" to something like "what the heeckkkkkk" when writing in order to show that the pronunciation of "heck" is being dragged out. When writing Chinese characters, how can I indicate this lengthened pronunciation?
Use 破折号(dash), for example:
I do not think there is a way to have the same effect as "what the heeckkkkkk" with Chinese characters, except within pinyin, which would be weird.
Languages are not supposed to all have the same set of tools to express emotions. There are a lot of things on can do with Chinese characters that cannot be done in other languages. For example 福 upside-down means "prosperity obtained" through a very rough pun which has no equivalent in other languages, I would bet.
However, all languages have tools to express emotions, and in Chinese, there a long list of finals like 啦咯嘛阿呀 used for this purpose, and among them you may find the one which will convey a similar emotion as in "whaat?"