docs: Add TOC template logic for ARC docs am: accb6660a5 am: 9d606e0082
am: 2de8d0dba8

Change-Id: I4a8bfcd63359339492d2ffda56347ef337005f75