Operator addons with multiple texture inputs in Python
I figured it out. I'd tried to think too much and the solution can be very simple. As nodes variable is already a list, I can simply tell the system which map belong to diffuse etc.
Instead of
 if mat.node_tree.links.new(img.outputs[0], prxy.inputs[5]):
        spec = img

        nodes = [k for k in node
                if isinstance(k, spec)]    
      
        for k in nodes:
            k.image = bpy.data.images.load(self.rough)
            return k
    elif mat.node_tree.links.new(img.outputs[0], prxy.inputs[0]):
        dif = imgdif

        secNode = [s for s in node
                if isinstance(k, dif)]    
      
        for s in secNode:
            s.image = bpy.data.images.load(self.diffuse)
            return s

I have done something like:
mat = self.id_data
node = mat.node_tree.nodes
img = bpy.types.ShaderNodeTexImage
nodes = [k for k in node
         if isinstance(k,img)]    
nodes[0].image = bpy.data.images.load(self.rough)
nodes[1].image =bpy.data.images.load(self.spec)