> I guess this is because the array declaration expects a type whereas my const > AllPoints is a slice, but I don't fully understand the details.
Correct, when you use type you define a subrange, but with const it's a slice. As you can read in the docs, array declaration expects an ordinal type for its index, which subrange fulfills but slice doesn't. OTOH, for .. in can loop over a slice, but not a subrange. Using x.low .. x.high you created a slice, so for .. in works with it.