Sortof - sioyek will parse the text and attempt to create a table of contents (this does not modify the base pdf), but the accuracy/usefulness varies. For papers I have found it works reasonably well, just sometimes misses a few sections or includes a few junk entries. For textbooks, especially ones with heavy math typesetting, there are too many junk/missing entries a lot of the time in my experience.
For papers or for textbooks I only need a small subset of, I find the autogenerated table of contents + bookmarks is typically sufficient. For other cases I like to use pdf.tocgen (https://github.com/Krasjet/pdf.tocgen) to semi-manually generate a correct table of contents.
> If set and the file doesn’t have a table of contents, we use heuristic methods to create a table of contents. You can use max_created_toc_size to prevent creating very large table of contents.