According to my understanding, the second argument to arrays.remove is a value, not an index. The proposed change clarifies this meaning (in the description) and makes sure that the implementation removes all occurrences of the value from the array.
Since the test case is ambigous both in description and in code, we might as well clarify to request the opposite behavior, i. e. removing only the first occurence of the value. In any way, the test case should settle on either of both possible functionalities.
Clarify arrays.remove test case