Some think John is independent of the synoptics, but he does show awareness of Matthew, Mark and Luke. He just felt more free to retell the story using his own words. Luke is his main source. He hardly uses Matthew at all.
John wants to refute the idea of the synoptics that no sign shall be given by having Jesus perform many public miracles. No one keeps the miracles secret as in Mark. John had multiple authors (there are signs of redaction) who were obsessed with proving Jesus really did perform miracles.
John felt free to invent new characters and events, change the order of events, and change how long and when everything happened. We know John was reorganized and rewritten because the order of events is jumbled. One bit of evidence for this is the two endings which don’t seem aware of each other (John 20:30-31 and John 21:24-25) just like the five different endings we have for Mark. The “let he who is without sin cast the first stone” story is widely known to be a later addition since it only appears in later manuscripts.
Although John is jumbled, it’s possible to reconstruct the original structure by looking for clues. In John, the first miracle Jesus performs is turning water into wine at a wedding at Cana, which is echoed by both blood and water coming from Jesus’s wound at his crucifixion. The second miracle also occurs at Cana after Jesus spends two days in Samaria, which echoes his time in the land of the dead. He even dies at the sixth hour which is when he meets his first Samaritan. He resurrects a child, a metaphor for his own resurrection. John likes to contrast full Jews with marginal Jews (Samaritans and Herodians).
Jesus being rude to his mother when he says, “Woman, what have I to do with you?” is a quote from the Elijah story in 1 Kings.
It’s a bit mysterious who the Beloved Disciple in John is supposed to be. Carrier thinks it’s most likely Lazarus who is repeatedly called the one Jesus loved. After he’s introduced, Lazarus reclines with Jesus like the Beloved Disciple does at the Last Supper. It was said that the Beloved Disciple would never die since Jesus already resurrected Lazarus. It makes sense that he’d be the first to believe in Jesus’s resurrection since he was resurrected himself.
John invented the Lazarus character in order to refute Luke’s parable in which Lazarus does not rise from the dead. Luke doesn’t think signs will be provided as proof, but John does, so he reverses the parable by having Lazarus rise from the dead. Also, John has Lazarus recline on the bosom of Jesus because Lazarus reclines on Abraham’s bosom in Luke’s parable.
Matthew, Mark, Luke and John are fictional literary creations with little concern for history. Thus, they support neither mythicism nor historicism.