Why not rewrite the array from the beginning so that indexes start from the beginning (1) again?