You must explain better the issue, but I think you have problem with references in C#. Basically, what are you trying is to clone the array and create temporary, but array in C# is reference, what mean that "arrayout" and "arrayin" point to the same value in the heap.
string[] arrayin;
arrayin=neveshteh.Split(' ');
int n = int.Parse(sr.ReadLine());
string[] arrayout = arrayin;
Instead of using "=", you can copy all values from one array to the another in a loop. Also, this method should work
link (I didn't try it yet).