Make the primitive collections visitors generic over Exception types.

Addressing one of the higher-risk concerns from #3477 
For these `visited` method it would be great to have javadoc saying what `true` and `false` means.