Given the consequences, I would not advise buying a group unless you are prepared to house them permanently, of if the store will take them back.
If the store has several of the species in a tank, it may be possible to observe pairs that are bonded or likely to bond. This is the only way I do this. Remain in front of the tank for some time, carefully observing the fish; move as little as possible so they are not distracted by your movements. Males will bee obvious because they will be continually "charging" each other; this usually will not be actual physical contact, though sometimes it may, but just a sort of "warning" advance of a male toward another male.
The fish that do not participate in the above are more likely females. The female closest to a male, that is basically ignored by that male, is more likely to bond with the male. The closer the two will be without any push or shove, the more likely a bond may form.
I do not advise keeping this ram with Aplocheilus lineatus (golden wonder killifish). A 29 gallon is not sufficient space for one thing, and you will not have fry for another. But the two fish are not all that compatible anyway.