Thank you for sending the extra information.
I think the following is about the best you can do with 12 players:
(4 9 v 12 2) ( 8 10 v 1 5) (3 11 v 7 6)
(5 10 v 12 3) ( 9 6 v 2 1) (4 11 v 8 7)
(1 6 v 12 4) (10 7 v 3 2) (5 11 v 9 8)
(2 7 v 12 5) ( 6 8 v 4 3) (1 11 v 10 9)
(3 8 v 12 1) ( 7 9 v 5 4) (2 11 v 6 10)
No player partners another player more than once. No two players play on the same court together more than twice. There are six pairs of player who never meet on the same court. Players 11 & 12 are always on the same court, however you could randomise the assignment of matches to courts in each round to lessen this problem.
Although it might seem otherwise, the forty player problem is actually much easier to solve. Just use any 5 rounds of
this schedule. No two players ever occur twice in the same foursome, so no matter how you divide a foursome into two sets of partners, you will always get a schedule where a player's 5 partners and 10 opponents are all distinct.