bash loop array by array size