This happens because both part1 and part2 (and obviously array too) variables are pointing to the same memory address, which stores the same information, therefore if you edit any of the three arrays the changes will be visible in all of them, because you're modifying the same value represented by three different variables.
To avoid this you should "copy" the array using slice() or something else, like a for loop, but slice is my favourite method, and also the fastest to type, so your code will become:
var part1 = array.slice();
var part2 = array.slice();
Now you can do whatever you want and the arrays will be treated as different variables.
Quick example:
a = [1,2]
> [1, 2]
b = a.slice()
> [1, 2]
b[0] = 2
2
b
> [2, 2]
a
> [1, 2]
Fastest method to copy an array:
If you're looking for the fastet method (since that there are several different methods to copy an array) then you should check this benchmark test, and run a test. The best solution isn't always the same one, so in the future it may change, depending on the JS implementation and your current browser version, although slice(), slice(0) and concat() are usually way faster than other methods.