How to randomize values from another field in the schema with certain repetition conditions?

I have a message schema. I want to randomize the id number as values in another field. I also want there to be some repetitions in these values

@ub352 Do you have an example data you want to generate? That would clarify your question a bit