That looks promising on initial inspection of e.g https://github.com/CTSRD-CHERI/beri/blob/master/cheri/trunk/... , although possibly a bit more imperative than I had in mind - still has for(). If I was working on HDL commercially I'd definitely give it a deeper look.