Duplicates the given element n times in a list.
Array: Location of the list to duplicate Count: Number of times to duplicate
Output-location: Location to store the output data