You may probably use template parameter. Otherwise you will probably need to overwrite CListView or write your own implementation extending from CBaseListView - I would take a look at renderContent() and renderSection() methods. You may provide your own template item (for example "{custom}") to be rendered with a method implemented by you and named as renderCustom().
Also accidentally saw this wiki article today - it describes similar approach I’ve written about. I didn’t study it thoroughly, but idea is a workable one.