"The X and (the) Y": When should I repeat the definite article?
Solution 1:
In English, you are allowed to (but need not) drop repeated elements in parallel structures. The problem with your second example is that you are dropping the elements in the wrong order. The following are all grammatical, and mean the same thing (although the third is ambiguous as it could mean the request function or just the request):
- The arguments belong to the request function and to the data function.
- The arguments belong to the request function and the data function.
- The arguments belong to the request and the data function.
- The arguments belong to the request and data functions.
Your second suggestion,
- The arguments belong to the request and to the data function.
is correct if you mean to say that the arguments belong to the request, and not the request function.
Your first suggestion,
- *The arguments belong to the request and to data function.
is incorrect because you dropped the and didn't drop to.
For your first example, both sentences are correct.