I am looping through rows using For Each Row and getting values of each row and storing in a string variable say storeVar, now all the values (each row value) I want to take them in an array of string. Please suggest me the way.
and after this want to remove duplicates from the array,
I guess the best option would be to use a List in this case instead of an array. You can add or remove items from a list during runtime and has much better handling than an array. To add items to a list, you can use Add To Collection activity. Another approach is to use the Invoke method to add items to a list.
And to remove duplicates in a list, you can easily use the below command in an assign activity ListName.Distinct().ToList
I have done a sample workflow for you on this. It adds items to a list, removes duplicates and gives out a output.
In your case, you do not need a list to handle the duplicates. It is much more efficient to do it through datatable functions. I have done the change so that you can get rid of all the looping you have. Now it has only 4 or 5 simple steps