Answer: I am not sure why you are considering these particular plants to be particularly incompatible. The typical spacing would be wide enough to allow the plants to mature without too much crowding, in a small space you can cluster plants more selectively to save room.
If you think of the old native American three sisters planting model, they used corn to support pole beans and planted squash vines in between them. So the spacing was pretty tight, with three crops in the space of one. Here is a description of why that works, and why/how, in case you are not familiar with it. You may need to cut and paste the complete url into your browser to make it work correctly.
Cucumbers tend to vine and take up quite a bit of space (unless you use a compact variety or grow them up on a trellis. Basil is a lightweight in comparison, so it would not be the best thing close up next to a cucumber as it would be soon overwhelmed. Basil might do better next to a tomato or following an early crop of peas where it could grow without too much competition. It will also tolerate a bit of shade so can do fine if shaded by a tomato, and it also appreciates the evenly moist rich soil tomatoes usually have.
Sunflowers may sometimes be a bit allelopathic, but it is not usually a problem that I am aware of. They are often planted along the northern edge of a garden -- where they will not shade their neighbors. Pole beans on supports are tall and need sun so they might be along the northern edge as well for the same reason. And, you probably would not want your pole beans trying to climb your sunflowers because they could add too much weight and then in a wind storm, blow over. And you need your bean support to be short enough that you can harvest the beans!(Although often childrens gardens suggest morning glories be grown on sunflowers, the morning glory vines tend not to be quite as heavy.) Keep in mind too that a large plant will have a large root system that would possibly outcompete a smaller, wimpy neighbor as the season progresses.
I apologize if I have not understood you completely. I hope this helps!
Q&A Library Searching Tips