Seems like a sensible enough place to store the info... I've no idea what happens at the hardware level but in the context I'm used to seeing them implemented it's a compile time switch. The downside is that I think texture arrays are incompatible with streaming - or at least there's something not straightforward to…
@poopipe that is very cool. The OpenGL docs say that you would use the values of the W texture coordinates (as in, UVW) per vertex to control what texture from the array to use. Say, W = 0.0 uses the first texture on that vertex, W = 3.0 uses the fourth texture and so on.
To expand on what RN says - its not entirely 1:1 in practice. For static environment stuff on a sensible engine you can fairly safely consider 1 material to = 1 draw call but The definition of a material can be a little cloudy. Usually using the same Shader and textures will give you one material but parameter changes (Eg.…