You are given an integer n representing the size of an array and an array arr containing n integers. Your task is to determine the maximum number of times any element appears in the array. If at least one element appears more than once, return the highest frequency among all elements; otherwise, if every element appears exactly once (i.e., no repetitions exist), return -1.