You are training to process multiple sentences separated by SEP tokens. That does not make sense, but it is not clear what you are trying to do.
The index error is raised because BERT was pretrained with only two segment IDs, 0 and 1. Those were needed for the NSP objective. It therefore does not make sense to add more segments/segment IDs - and that simply won’t work as you found out. Perhaps you should start by explaining what you are trying to do.
I highly recommend you to read the original BERT paper to better understand this.