[12732] Implement TARGET_RANDOM_UNIT_CHAIN_IN_AREA

Also unify the TARGET_RANDOM_CHAIN_IN_AREA code

Signed-off-by: Xfurry <xfurry@scriptdev2.com>