in reply to complementary array indices

You might consider Set::IntSpan.