Write a basic script or program to reverse a string or find duplicates in an array.
Implement def reverse_string_or_find_duplicates(value):. If value is a string, return its characters in reverse order. If value is an array of integers, return each duplicated value once, ordered by the first time it is detected.
Inputs contain valid strings or integer arrays. Return an empty string or empty array when no characters or duplicates exist.
def reverse_string_or_find_duplicates(value):