It is surprising me that I do not find the answer after 1 hour search for this. I would like to pass an array to my script like this:
test.sh argument1 array
You can write your array to a file, then source the file in your script. e.g.:
array.sh
array=(a b c)
test.sh
source $2 ...
Run the test.sh script:
./test.sh argument1 array.sh argument3