Thank you everyone for sharing the insight and sharing the possibilities and knowledge. We have fixed the generic code and that's working now. We created a variable force-array similar to force string which is present in the code and in the parameter 'valueLookup' we are defining the field name where we want to create the array.