Well this add-on does that and it's a free add-on. Not sure what custom work you had done. The only thing it doesn't do is show who "has" viewed a thread. It only shows the ones who are currently viewing. However I saw a separate add-on Xon made that does that and does show the users who have viewed it.
Anyways these add-ons show who's viewing a thread. I have it enabled on my site for Xenforo 2.
Its weird that xf does not have this yet. I have had this function for 14 years. I even had it developed for vbulletin as a live refreshing function and the software was ready quite fast. Competing software has it because its a simple function highly valuable to the user experience.
I would even say its essential functionality. Once you have it on your site you will understand why. Often its just as important to know who is in the thread and who has read the thread as it is to know who the posters are in the thread.