Implemented bound checking in array assignment