Is a table of contents an "index"?
Index generically does refer to a body of indexed (entered) material, and in that general sense it would apply to the table of contents of a book. However, this usage becomes confused since index is also a more specific literary term meaning:
1. (in a nonfiction book, monograph, etc.) a more or less detailed alphabetical listing of names, places, and topics along with the numbers of the pages on which they are mentioned or discussed, usually included in or constituting the back matter.
It would therefore be best to avoid referring to the table of contents as an index.
However, the verb index is not a literary term, as is the noun. Since this is so, you may use it when referring to the table of contents, with no resulting confusion, e.g.:
Do you want to index subsections in the table of contents?
You left off the rest of that meaning:
index
noun
2. a sequential arrangement of material, especially in alphabetical or numerical order.
The verb meaning that seems to match your question is:
21. to enter in an index, as a name or topic.
But that isn't appropriate for a Table of Contents until you notice the earlier meaning:
19. Obsolete
a. a table of contents.
b. a preface or prologue.
So you could use the verb index to refer to adding something to a Table of Contents, but it's obsolete at best and I think likely to be misunderstood.