Ajax was definitely Achilles' cousin (son of Telamon), but I'm now confused re Patroclus. I had a vague idea he was sometimes referred to as a cousin, but this doesn't seem to be supported by any account of his genealogy - at most he is actually, bizarrely, Achilles' nephew by a much older half-sister.
Homer doesn't mention this though. In the Iliad he's no relation, but the son of Menoetius and Achilles' older companion/mentor; both were taught by Chiron. It's in Iliad book 11.