accumulate index changes into array and convert it into bitset as needed