At this year's Developer Summit, I talked with one of the Javascript specialists about adding a TOC into the API. He talked about some of the issues with modifying the existing WebApp Builder TOC, since that relies on using ArcGIS.com web maps and not directly using services. I described how I was using the AGSTOC with both my own services and with outside services (when I didn't want to show all the layers in a particular service)
In a followup email, I gave him code samples on how I was able to show only a subset of layers in a service and also how I could create a TOC that allowed for both check box and radio button ways of turning on layers. In one case, I have a TOC that has layers that can be turned on independently and layers that can only be turned on one at a time.