Finds array's max value and corresponding index