A simplistic solution would be to loop through the array twice. The first loop would go from the first element to the second off last element (the reason why will become clear in a moment). The second loop will go from the second element to the last one, and will be contained in the first loop.
Basically, you will use the value in the outer loop as a comparison for every item in the inner loop. This is why the loops have the start and end points that they do.
As pseudo code:
For outerloop = 0 to array.ending_point - 1
For innerloop = 1 to array.ending_point
If innerloop.value = outerloop.value Then Duplicate.
End innerloop
End outerloop
You have the logic there - I leave it to you to write the code.
Note - there are many more efficient methods to do this, but some of them don't match your criteria. You could sort the elements so you only need to check the next element to see if it's the same as this one (you'd only need one loop then). You could remove duplicate entries from the check so that you would ignore the elements later on that match as they would have been found by earlier iterations through the loop.