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?