Evaluate methods with short array syntax type hints correctly

If methods had a type hint like "MyClass[]" then the expected result was an instance of "MyClass[]". Instead it should be an array of "MyClass".

This PR contains the following change:
if a type is suffixed with "[]" the type gets replaced by "array" during the parsing phase. 

See tests for further details.