Coverage: cover change number of inputs in a generic way

Hi
I have a DUT that instantiate in several place in the project, each time it has different num of input_vector, base on a PRAMETER:
for example:
module dut #(parameter NUM_OF_ELEMENTS = 32)(input logic [NUM_OF_ELEMENTS - 1 : 0] a, output logic [NUM_OF_ELEMENTS - 1 : 0] b);
and:
dut #(.NUM_OF_ELEMENTS(18) dut1 (.a(a),.b(b));
dut #(.NUM_OF_ELEMENTS(28) dut2 (.a(a),.b(b));

I want to make sure which inputs had enter to the block, but to write it as generic as possible.
I thought about bind the coverage to every instantiate of the dut:
bind top.wrap1.dut1 generic_dut_coverage #(.NUM_OF_ELEMENTS(NUM_OF_ELEMENTS)) warp1_dut_cov_ins(.);
bind top.wrap2.dut2 generic_dut_coverage #(.NUM_OF_ELEMENTS(NUM_OF_ELEMENTS)) warp2_dut_cov_ins(.
);

inside generic_dut_coverage I wrote:
bit [NUM_OF_ELEMENTS - 1 : 0] pins_array [NUM_OF_ELEMENTS];
covergroup a_cg @(a[NUM_OF_ELEMENTS - 1 : 0]);
option.per_instance = 1;
a_STATUS : coverpoint a {
bins one_hot_a_status[NUM_OF_IRQ] = pins_array;
}
initial begin
foreach(pins_array[i]) pins_array[i] = 1 << i; // first populate with the one hot values
i_a = new; // create the covergroup

end

My problem is that it doesn’t detect when to pins are on together, so it detects [001] and [010], but not [011].

Does there is a way to collect an information for each pin separately, but in generic way, means without write manually the number of elements, and without write different bins for each instantiate of the DUT?

Many thanks!