How to create the cover group's bins that based on array's values

In reply to dave_59:

Hi Dave,
Thanks for the response, but maybe I didn’t explain myself enough-
One of my coverpoints is based on the get_block function that is defined in the class, if I define the covergroup as external then it does not know the function