Matthew 26:47-56 records a version of the arrest in the Garden. It mentions one of the bystanders using a sword, striking the High Priest's servant and cutting off the servant's ear; no names mentioned.
Mark 14:43-52 closely parallels the account in Matthew. Again one of the bystanders with a sword, striking and cutting off the servant's ear; no names mentioned.
Luke 22:47 mentions the possibility of armed resistance. Then 'one of them' cut off the servant's ear. No names yet. Luke mentions Jesus healed he servant's ear.
John 18:1-11 gives the most detailed account of the incident. It is the only one to identify Peter and Malchus.
Allow me to express doubt over the accounts attempting to cover for Peter. Too many of the Temple police were on hand for Peter NOT to have been seen and recognized.
I can see two possibilities. One is that the synoptic Gospel writers were trying to be brief in their accounts. The other - and more likely in my mind is the various statements were based on eye-witness observations. Those observations were made from different occasions, limiting vision and observation. So all the people present saw - or didn't see - different aspects of the event.
Ask any lawman, eyewitness testimony is typically the least solid type of evidence. I do not doubt the working of Divine Inspiration, but God never inspired writers to claim to see what they did not see in fact.