How can I easily skip indices in an array?

Try also Cartesian Indices:

CI = filter(x -> x ∉ CartesianIndices((1:3,2:2)), CartesianIndices(A))
s = sum(A[I]*B[I] for I in CI)
2 Likes