Create positional relationship between two objects in the replicator

Hi Guys,
I would like to ask how can we create positional relationship between two objects in the replicator.
For example. If we have a wall (object 1) whose position will be randomized. How can we position a portrait (object 2) in a random way on top of the wall (object 1)

Could you please provide me with example code if possible ?

Thanks