Arrays not working as expected

Because the slice itself is a pointer, you’re actually operating on the same pointer in the pos.

			// array = append(array, pos)
			array = append(array, []int{pos[0], pos[1]})
			// or
			array = append(array, append(make([]int, 0, len(pos)), pos...))
			// or other...