The question is a little complex. The problem here is to get rid of duplicates and save the unique elements of array into another array with their original sequence.
i think that in C you can create a second array. then you copy the element from the original array only if this element is not already in the send array. this also preserve the order of the element.
if you read the element one by one you can discard the element before insert in the original array, this could speedup the process.