Pumpkin vines get very, very long! We had them all over a portion of our yard last year and they just kept on growing!
I would think you'd want no more than 1 bean plant per corn plant and then plant the melons about 2 feet away the base of the corn and beans.