It may be that I did not understand your original posting. I was assuming that you did not want any pair of players to play together more than once, so once 1 & 2 partnered, you did not want them to oppose each other later on. If you want to go as long as possible without any repeats like this, then the link above will give you a schedule, but only where you have a mulitple of 4 players between 16 and 32.
For doubles play, where everyone partners each other else exactly once, a balanced schedule is only possible when the number of players is a multiple of four, or one more than a multiple of 4. In such a schedule any pair of players will be on court together exactly three times, once as partners and twice as opponents. There are some
schedules here and there is no single formula for constructing them. If there are 10 players then there is a fundamental problem, there is an odd number of partnerships to play, 45, but of course each doubles game involves 2 partnerships, so there can never be a balanced schedule. The Wiseman website I linked to above contains an unbalanced schedule that involves both singles and doubles play, below is a possible alternative. It is a balanced doubles schedule for players B, C, D, E, G, H, I and J, however players A and F play one less game than the others and never meet as partners or opponents.
[(G J):(A I)] [(E F):(B D)]
[(F G):(E I)] [(C H):(A J)]
[(C E):(A G)] [(I J):(B F)]
[(H J):(D F)] [(A E):(B I)]
[(F H):(B G)] [(A C):(D I)]
[(B J):(A D)] [(C F):(E H)]
[(B E):(C J)] [(D H):(G I)]
[(B H):(C I)] [(E G):(D J)]
[(C D):(F I)] [(A B):(G H)]
[(E J):(H I)] [(D G):(B C)]
[(D E):(A H)] [(C G):(F J)]