Remove duplicates from an array.
Implement remove_duplicates(nums) to return a new array containing each value once, preserving the order of its first occurrence.
The input is an array of integers, and the output must also be an array of integers.
def remove_duplicates(nums):