Not tested, but I don't think you'll have to change the code. At first glance I see nothing that would not work with vB4.
You just need to register the variable $threadlist for any template you want to use it in.
Example for FORUMHOME:
PHP Code:
vB_Template::preRegister('FORUMHOME', array('threadlist' => $threadlist));
Then call it like that in FORUMHOME template:
HTML Code:
{vb:var threadlist}