Array paste pastes copies of an object in a rectangular arrangement. I don't see the relationship with choosing an object in runtime or changing its image, but I'll go on a limb and guess what you are trying to achieve.
If you want to have different unit types and each with a different maxspeed and be able to choose based on this maxspeed, you might want to:
-make each unit type a different object, so they can look and behave different from each other.
-put all of these units in a family, so you can select among them with no distinction.
-set some common variables to the family, among them maxspeed.
Then you would pick the family and within that the one with the largest maxspeed variable.