The best way I know how to do this is with perl in-place editing:
eg. myfile.txt contains:
\t (obj)
\t (obj)
\t (obj)
Run in-place editing:
perl -i.bak -ne '$a=int(rand()*2000); s/\((.*?)\)/{$1$a}/g; print' myfile.txt
myfile.txt now contains:
\t (obj1869)
\t (obj665)
\t (obj1459)
Obviously customize 2000to your requirements.
EDIT . If you want to use incremental identifiers, use:
perl -i.bak -ne '$a++; s/\((.*?)\)/{$1$a}/g; print' myfile.txt