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

Change-Id: I99c246c017544d7639cc110eb02b4f2d5fd07865