### Godot version

4.0beta14

### System information

Windows 10

### Issue description

Returned Array value isn't converted to Packed*Array

### Steps to reproduce

```
var string_array: PackedStringArray = ["test"] # valid
var int_array: PackedInt32Array = [3] # valid

func get_packed_string_array() -> PackedStringArray:
	return ["test"] #error


func get_packed_int_array() -> PackedInt32Array:
	return [3] #error
```

Line 8:Cannot return value of type "Array" because the function return type is "PackedStringArray".
Line 12:Cannot return value of type "Array" because the function return type is "PackedInt32Array".

### Minimal reproduction project

[return_bug.zip](https://github.com/godotengine/godot/files/10490367/return_bug.zip)

reduce_unary_op(static_cast<GDScriptParser::UnaryOpNode *>(p_expression));
			break;
		
		case GDScriptParser::Node::NONE:
		case GDScriptParser::Node::ANNOTATION:
		case GDScriptParser::Node::ASSERT:
		case GDScriptParser::Node::BREAK:
		case GDScriptParser::Node::BREAKPOINT:
		case GDScriptParser::Node::CLASS:
		case GDScriptParser::Node::CONSTANT:
		case GDScriptParser::Node::CONTINUE:
		case GDScriptParser::Node::ENUM:
		case GDScriptParser::Node::FOR:
		case GDScriptParser::Node::FUNCTION:
		case GDScriptParser::Node::IF:
		case GDScriptParser::Node::MATCH:
		case GDScriptParser::Node::MATCH_BRANCH:
		case GDScriptParser::Node::PARAMETER:
		case GDScriptParser::Node::PASS:
		case GDScriptParser::Node::PATTERN:
		case GDScriptParser::Node::RETURN:
		case GDScriptParser::Node::SIGNAL:
		case GDScriptParser::Node::SUITE:
		case GDScriptParser::Node::TYPE:
		case GDScriptParser::Node::VARIABLE:
		case GDScriptParser::Node::WHILE:
			ERR_FAIL_MSG("Reaching unreachable case");
	}
}
void GDScriptAnalyzer::reduce_array(GDScriptParser::ArrayNode *p_array) {