At present there is no option to define UDF for AR or AP separately.
Thus the idea of making certain fields mandatory and only applicable for say AR or AP is not feasible.
As per business needs and the current UDF architecture is not helping in Finance module. This needs to be worked upon.