Texture mapping in memory

I have two question
1.How are the textures mapped in memory (in what kind of array) ?
2.And in what memory ?
thank you in advance !

Each video hardware is free to store it any way it wishes since GL doesn’t dictate what they should do.
Each hw has it’s own internal format. For example, some don’t support GL_RGBA but do support GL_BGRA and if you try to upload in RGBA format, the driver will switch red and blue around using the CPU.

The array type used depends on the texture type (1D, 2D, 3D, cubemap). The hw can also choose how and where to store mipmaps.

The driver decides on the memory, but typically, they go into VRAM when there is space.

Hope that helps.