Friendship is a necessity in the Glade. Without a strong sense of community based on personal relationships, the Gladers would not be able to survive. Relying on one another to fill certain roles allows for a functional society that is self-sustaining.
Thomas is able to make friends after arriving, particularly with Chuck. Chuck believes in Thomas's ability to lead them to safety, but more than anything sees Thomas as his closest friend. Thomas is occasionally annoyed by Chuck, but it is strongly hinted that these boys might be brothers. Thomas also forms a close working bond with Minho. This bond allows Thomas to assume a more active role in the Glader community, and which allows him to lead the others out of the Maze.
Thomas's closest bond, however, is with Teresa. It is a bond that remains largely unexplored by the end of the novel but even the little contact the two characters have with each other is poignant and loaded. They recognize each other as friends even without knowing anything about each other or themselves. Their previous friendship left an imprint that no amount of memory-wiping could fully erase. Furthermore, they each stores some memory of their collective past. In this manner, our friends can be seen as repositories and reflections of our shared lives.