How can we update arraylist process variable in connector in script?

Update conResult list variable with process variable list? ex: To update string process variable [updateActivityDataInstance(String dataName, long activityInstanceId, Serializable dataValue)] like this do we have any predefined method is available?