Bash Script Using An Array For Partial Products