What I wasn’t aware of: C++’s

for (auto foo : collection) { … }

loops also work on arrays. Not on random pointers used as arrays though, just on the kind of arrays you could call sizeof() on to get the total size instead of size of a pointer.