Tracking instantiated objects

How do you track instantiated objects?

Suppose you have a bunch of instantiated objects, call each one `B`. Suppose `B` should do something when it hits `A`.

How do you know which one of the B's hit A?

for(var i = 0 ; i < OBJECT_AMOUNT ;i++ ) 
{ 
//b*= --put instantiate script here--* 
*}*
*```*
_<p>So b *= to that object... If that makes sense?</p>*_