All the other fruits on the same plant and surrounding squash plants looked like on of these:
Over the weekend I saw a very similar fruit to the small green one above, growing in someone else's garden, also on a squash plant where other fruits were yellow. I originally thought that this might be a squash-cucumber cross, but the other gardener did not seem to have any cucumber plants nearby.
Since it was so easy to find another example, I'm thinking that this might be a well known squash phenomenon.
It is very interesting, but I have not a clue really - Where did you get the seed?
If you purchase a hybid tomato at the supermarket, and then plant the seeds from that tomato, you might get a tomatoes that could be like the parent plants used for the cross, I think.
I have no idea what happens to GMO tomato seeds in this type of scenario. Maybe some one who understands genetics could let us know what they think about the possibility.