I read an array via system.opc.readValue and I got 2 differents results between CODESYS PLC and TwinCAt OPC-UA Server.
On CODESYS on got what I expect
[[Ljava.lang.Object;@19287bb0, Good, Mon Apr 15 13:24:52 EDT 2024 (1713201892197)]
And with TwinCAT I got for the same array
[null, Bad("Bad_AttributeIdInvalid: The attribute is not supported for the specified Node."), Mon Apr 15 13:20:30 EDT 2024 (1713201630173)]
It's an array of objects that contains 3 tags.
Do I have to configure somethings to get same results on TwinCAT ??
The most likely cause of the Twincat result is that the NodeId you are pointing at is not a VariableNode.
Some servers model arrays as a VariableNode containing an array value and then, optionally, a child VariableNode per element of the array (each with a scalar value).
Other servers may model arrays as an Object (that has no Value) and a child VariableNode per element of the array.
I don't have nearly enough information to tell you the answer to that. I don't know what, if any, relationship exists between Codesys and TwinCAT, or what projects you're even talking about.
Use UaExpert to browse to these Nodes in each server and see if they're actually the same or not.