Is there a way to array a rig non-destructively?

For example, we have one centipede segment


Is there any way to duplicate it 20 times with the rig that the spine bones would connect? So that you could edit the first segment and the changes would be duplicated for the all next segments, like an array modifier.

I tried doing it with the “sverchok” plugin but it doesn’t seem to have that functionality

Can you even do it with geometry nodes or python script?

with python - for sure. I would try it with animation nodes, because they have an official python node with which you can do the connecting of the nodes. Everything else should be doable with the “normal” nodes of AN.