Added getMaxValue for arrays (vector and matrix)