It is possible to use secondhand key fobs as long as the Lockset Bar Code of the donor vehicle is known. If it is not known, a main dealer should be able to find it out from the VIN No. but may require proof of ownership - difficult if the keys are bought on fleabay. Also assuming the locks have not previously been changed and the key is the correct frequency for the country.
Once the 14 digit Lockset Bar Code is known, the 9 digit key Fob Code can be found. The Blackbox Systems Faultmate forum can supply it. The new Fob Code can then be entered and saved in the BECM to allow synchronisation.
A mixture of keys from different cars obviously cannot be used.