Not everyone works together all the time, but various pairs do on different projects. What is the best way to configure desks to optimize for communication and ability for people to focus.
There are two important things you have to take into account when deciding how to group people:
How much of the work is "deep thinking, in-the-zone" work (like programming, writing, solving problems, research, and reading) and who is doing that work?
People doing deep thinking work need to get into a psychological state of flow and stay there. There are only to ways to provide this in the workplace: individual private offices or a workspace exclusive to other people doing "in-the-zone" work.
What are the important official communications paths and what are the valuable unofficial communications paths?
An example of an official communication path might be a team of writers working on a script together. Their very work depends on speaking to each other. An unofficial communications path might be a salesperson and a programmer bumping into each other in the break room, and the salesperson gives the programmer useful insights into customer requirements.
My main experience is with software companies. At software companies, you have a large group of people who spend most of their time "in the zone" and who need library-like quiet and no interruptions to be productive. You can either provide this with private offices (ideally). You can possibly provide this with small team rooms of 2-4, or even a large open workspace, as long as everyone in the same room is a programmer. But the larger the space, the more likely it is that any conversation will knock everyone out of their sense of flow and concentration. This is extremely damaging to productivity, a process which is well documented in the book Peopleware.
Other people at software companies (sales people, marketing people, designers and product managers) are much more likely to be talking--to each other, or to customers--during the day, and must be kept away from the programmers.
In general, I've designed four offices for software teams and the design is always a large number of private offices for software developers, and an open work area for everyone else.
Personally (with quite a bit of development and testing experience in various settings: open spaces, closed spaces, semi-open, partitioned) I much prefer and favour a totally open space. Two rows of desks facing one another makes a line. There may be a few lines one next to the other with a comfortable amount of space for people to walk between the lines freely without bothering those sitting. You must make sure each desk has enough room to welcome an occasional guest and spread large enough amounts of paper notes without moving the computer, screens, keyboard, mouse or chair(s).
I would not necessarily put pairs that frequently work together absolutely besides or facing one another. Close proximity helps (easy access to information), but a bit of mingling with others helps too (easy access to different experience), find a healthy balance. In a fully open space, I have frequently helped others working on unconnected projects to mine or to one another, to connect them on similar problems and speed up solutions.
Top all of that with a minimum of one meeting room to sit at least half the largest team, if not the whole team. And maybe a second meeting room to sit maybe a quarter of the largest team. Both rooms must be equipped with phone conferencing facilities. Computers in the meeting rooms are a bonus, a minimum of one can be really helpful.
Meeting rooms should be available relatively easily for any pair to work their heart's content if a bit of privacy from the crowd helps.
Having tried a few different arrangements, I would say that the best is to have people clumped together into small groups/teams as applicable -- similar to a long line, but make sure people have (the perception of, at least) sufficient privacy. It's important to give that sense of (partial) privacy, because people sometimes need to handle on off-topic or personal issues at work, and don't want to be embarrassed about doing so.
My experience is that half-cubicles (chest-high) usually give people enough privacy, but also sufficient openness that they wouldn't risk playing Tetris during work hours. I like clusters of four arranged in a square, but this would work equally with a line.
Totally open spaces tend to be noisy and very social -- people disturb you for anything and anything -- and in my experience, that's more detrimental than helpful.
One scheme that works well during death marches is to have a large "war room" with a bunch of desks facing each other (in lines if the room size fits) while keeping the cubes & private offices. When communication is very important, move part of the team into the war room while allowing them their old offices to retreat to for the occasional quiet time. The togetherness of the war room allows for much more rapid and effective communication than even IM allows.
From a managerial viewpoint, the war room concept also makes it very hard for those developers that don't do anything to hide. The other developers will quickly out them.