Adding functionality to test against sparse arrays