Implement the function min_operations_to_make_array_good(test_cases) which calculates the minimum number of operations required to turn each array in a set of test cases into a "good" array. An array is defined as "good" if it can be represented as points on a straight line. You need to determine the minimum number of elements that need to be removed from the array to achieve this.
Input/Output Requirements
Input
The function takes a single argument test_cases, which is a list of tuples. Each tuple represents a test case and consists of:
An integer n (1 ≤ n ≤ 1000): the number of elements in the array.
A list arr of integers of length n (−10^9 ≤ arr[i] ≤ 10^9): the array itself.
Output
The function returns a list of integers. Each integer is the result for the corresponding test case, representing the minimum number of operations required to make the array "good".