### Godot version

4.0.1-stable

### System information

Android 12, Mobile Renderer

### Issue description

When retrieving Mesh data from a MeshInstance3D like so...
```GDScript
var mesh = self.get_mesh()
var mesh_array = mesh.surface_get_arrays(0)
var vertex_array = mesh_array[Mesh.ARRAY_VERTEX]
var index_array = mesh_array[Mesh.ARRAY_INDEX]
```
...the index_array contains vertex indices that are not within the vertex_array.

This issue does not occur in the Linux editor, but does occur on my Android build:
Android 12
arm64v8
sdk version 32.0.0
ndk version 23.2.8568313

### Steps to reproduce

Download the minimal reproduction project, which contains an example ArrayMesh and GDScript script which has the code shown above. Build to Android using the 4.0.1 build template and test.

### Minimal reproduction project

[Array_Mesh_Test.zip](https://github.com/godotengine/godot/files/11133179/Array_Mesh_Test.zip)

DrawList *dl = _get_draw_list_ptr(p_list);
	ERR_FAIL_NULL(dl);
#ifdef DEBUG_ENABLED
	ERR_FAIL_COND_MSG(!dl->validation.active, "Submitted Draw Lists can no longer be modified.");
#endif
#ifdef DEBUG_ENABLED
	ERR_FAIL_COND_MSG(!dl->validation.pipeline_active,
			"No render pipeline was set before attempting to draw.");
	if (dl->validation.pipeline_vertex_format != INVALID_ID) {
		
		ERR_FAIL_COND_MSG(dl->validation.vertex_format == INVALID_ID,
				"No vertex array was bound, and render pipeline expects vertices.");
		
		ERR_FAIL_COND_MSG(dl->validation.pipeline_vertex_format != dl->validation.vertex_format,
				"The vertex format used to create the pipeline does not match the vertex format bound.");
		
		ERR_FAIL_COND_MSG(p_instances > dl->validation.vertex_max_instances_allowed,
				"Number of instances requested (" + itos(p_instances) + " is larger than the maximum number supported by the bound vertex array (" + itos(dl->validation.vertex_max_instances_allowed) + ").");
	}
	if (dl->validation.pipeline_push_constant_size > 0) {
		
		ERR_FAIL_COND_MSG(!dl->validation.pipeline_push_constant_supplied,
				"The shader in this pipeline requires a push constant to be set before drawing, but it's not present.");
	}
#endif
	
	for (uint32_t i = 0; i < dl->state.set_count; i++) {
		if (dl->state.sets[i].pipeline_expected_format == 0) {
			continue; 
		}