### Godot version

v4.0.3.stable.arch_linux

### System information

archlinux

### Issue description

The code below will crash the engine without any error or warning from the editor.
```
var arr := [1,2,3,4,5,6,7,8,9]
func _ready():
	print(arr.slice(50, 0, -1))
```
Here the console log:
```
handle_crash: Program crashed with signal 4
Engine version: Godot Engine v4.0.3.stable.arch_linux
Dumping the backtrace. Please include this when reporting the bug to the project developer.
[1] /usr/lib/libc.so.6(+0x39ab0) [0x7f886a04fab0] (??:0)
[2] /usr/bin/godot(+0x46ee2f3) [0x56088fdb82f3] (??:?)
[3] /usr/bin/godot(+0x472b175) [0x56088fdf5175] (??:?)
[4] /usr/bin/godot(+0x47383d8) [0x56088fe023d8] (??:?)
[5] /usr/bin/godot(+0x1512883) [0x56088cbdc883] (??:?)
[6] /usr/bin/godot(+0x13fa8fd) [0x56088cac48fd] (??:?)
[7] /usr/bin/godot(+0x2e5fe23) [0x56088e529e23] (??:?)
[8] /usr/bin/godot(+0x3389728) [0x56088ea53728] (??:?)
[9] /usr/bin/godot(+0x48ba7a8) [0x56088ff847a8] (??:?)
[10] /usr/bin/godot(+0x2e28d96) [0x56088e4f2d96] (??:?)
[11] /usr/bin/godot(+0x2e28d37) [0x56088e4f2d37] (??:?)
[12] /usr/bin/godot(+0x2e5d5bf) [0x56088e5275bf] (??:?)
[13] /usr/bin/godot(+0x2e5eb33) [0x56088e528b33] (??:?)
[14] /usr/bin/godot(+0x10a1479) [0x56088c76b479] (??:?)
[15] /usr/lib/libc.so.6(+0x23850) [0x7f886a039850] (??:0)
[16] /usr/lib/libc.so.6(__libc_start_main+0x8a) [0x7f886a03990a] (??:0)
[17] /usr/bin/godot(+0x10afda5) [0x56088c779da5] (??:?)
-- END OF BACKTRACE --
```

### Steps to reproduce

n/a

### Minimal reproduction project

n/a
Variant *data = array.ptrw();
	if (source_typed.type == Variant::NIL && typed.type != Variant::OBJECT) {
		
		for (int i = 0; i < size; i++) {
			const Variant *value = source + i;
			if (value->get_type() == typed.type) {
				data[i] = *value;
				continue;
			}
			if (!Variant::can_convert_strict(value->get_type(), typed.type)) {
				ERR_FAIL_MSG("Unable to convert array index " + itos(i) + " from '" + Variant::get_type_name(value->get_type()) + "' to '" + Variant::get_type_name(typed.type) + "'.");
			}
			Callable::CallError ce;
			Variant::construct(typed.type, data[i], &value, 1, ce);
			ERR_FAIL_COND_MSG(ce.error, vformat(R"(Unable to convert array index %i from "%s" to "%s".)", i, Variant::get_type_name(value->get_type()), Variant::get_type_name(typed.type)));
		}
	} else if (Variant::can_convert_strict(source_typed.type, typed.type)) {
		
		for (int i = 0; i < size; i++) {
			const Variant *value = source + i;
			Callable::CallError ce;
			Variant::construct(typed.type, data[i], &value, 1, ce);
			ERR_FAIL_COND_MSG(ce.error, vformat(R"(Unable to convert array index %i from "%s" to "%s".)", i, Variant::get_type_name(value->get_type()), Variant::get_type_name(typed.type)));
		}
	} else {
		ERR_FAIL_MSG(vformat(R"(Cannot assign contents of "Array[%s]" to "Array[%s]".)", Variant::get_type_name(source_typed.type), Variant::get_type_name(typed.type)));
	}
	_p->array = array;
}
void Array::push_back(const Variant &p_value) {