@jextxadore There's always the old BASIC approach of leaving a gap of 10 between each to allow slotting in new ones later. But a table of contents is definitely a lot more flexible and explicit.
That sed script is going to require me to puzzle over some of the weirder operators. I do wonder if you couldn't just use tr to rewrite newline to space instead.