In bash, you can do
MYVAR="somevalue" ./myscript.sh
and the variable MYVAR will be defined when running myscript.sh.
My questions is: can I do the same for arrays? Unfortunately, neither of the following works.
MYARR=( 1 2 ) ./myscript.sh
MYARR[0]=1 MYARR[1]=2 ./myscript.sh
declare -a MYARR=( 1 2 ) ./myscript.sh