Takes the published UAVariable rather than UAVariableImpl.
This function is exported from the package entry while UAVariableImpl is not, so naming the
implementation class here made the first overload uncallable from outside - and from the
package's own tests, which hold public types. The instanceof UAVariableImpl below still
narrows it at run time; that check is what decides the branch, not the declared type.
Building and maintaining a variable whose value is an array of extension objects.