Checkng upper bound in *Array classes.

*Array classes will now throw an IndexOutOfBoundsException if a caller
tries to get or set a value for an index that's invalid based on the
current size.

Bug: 118339123
Test: atest CtsUtilTestCases
Change-Id: Iddc9a0c7c89e0ac743b0380049527a1b2dfb434f
7 files changed