"Range must be bounded by constant expression" - Error from a constraint block

In reply to naveensv:

I don’t see any way of doing it, since this would ultimately mean using a random variable to index single_dimension, which isn’t allowed by the LRM.