If twofunction() requires local copies of external arrays, then you must pass in these external arrays as parameters. Then, twofunction() must copy the contents of the passed in arrays into its own local copies, so that it can perform operations on its local copies without altering the originals.
The pseudocode would look something like this:
twofunction(array1, array2)
declare array1copy
declare array2copy
copy(array1, array1copy)
copy(array2, array2copy)
// perform some operation on array1copy
// perform some operation on array2copy
The copy() function would look something like this:
copy(source, destination)
Loop on 'i' from 0 to n-1, where n is the length of the source:
set destination[i] = source[i]
Next 'i'.
Since you're working in C, you must also pass length parameters along with these arrays, to tell the copy function how many items to copy ('n' in the above pseudocode), as well as ensure you have allocated sufficient memory in the destination arrays so that you do not suffer an overflow error.
Hofstadter's Law: It always takes longer than you expect, even when you take into account Hofstadter's Law.
– Douglas Hofstadter, Gödel, Escher, Bach: An Eternal Golden Braid