Array of cover points in a covergroup

In reply to kvenkatv:
This should get you started

package global_types;
   typedef bit [31:0] uint;
   typedef uint uint_da[];
endpackage
module bot;
   import global_types::*;
   uint sig;
endmodule
module top;
   import global_types::*;
   bit clk;
   
   uint_da encodings = onehots();
   function uint_da onehots;
      onehots = new[32];
      foreach (onehots[i]) onehots[i] = 32'b1 << i;
   endfunction : onehots
   covergroup cg(ref uint arg)  @(posedge clk);
      option.per_instance = 1;
      coverpoint arg {
	 bins b[] = encodings;
      }
   endgroup : cg
	 	  
  genvar i;
   for (i = 0; i<32;i++) begin : g_regs
      bot u();
   end
   for (i = 0; i<32;i++) begin
      cg cg_inst;
      initial cg_inst = new(g_regs[i].u.sig);
end
endmodule : top