16, 17. δότεαὐτοῖςὑμεῖςφ., which is common to the three first Evangelists, is considerably expanded in the more detailed account of Joh 3:1-36; John 4:1-54; John 5:1-47; John 6:1-71; John 7:1-53; it was Andrew who spoke in our Matthew 14:17, and the five loaves and two fishes were brought by a lad: John 6:8-9. They were barley loaves and (salt) fish; ibid. And we have (perhaps, but see note there) the vast concourse accounted for in John by the fact that the Passover was at hand, and so they were collected on their journey to Jerusalem.
See a very similar miracle in 2 Kings 4:42-44; only then there were twenty barley loaves and an hundred men. See also Numbers 11:21-22.