In reply to djmandela:
This is another implementation, where bin is created for each values per index basis.
module array_covergroup_test();
bit [7:0] data[127:0] ;
bit [7:0] values [$] = {8'd1,8'd2,8'd4};
covergroup array_cg (int index);
option.per_instance = 1;
coverpoint data[index] {
bins value[] = {8'd1,8'd2,8'd4}; //{values};
}
endgroup
array_cg cg[128];
initial begin
foreach(cg[i])begin
cg[i] = new(i);
end
repeat(100)begin
std::randomize(data);
foreach(cg[i])begin
cg[i].sample();
end
end
end
endmodule // array_covergroup_test