Electrical cable between buildings
It would appear that in Indonesia, most of your electrical systems are based on European standards, and both NYY and NYM refer to German VDE cable types.


You are correct that plain PVC insulation is usually inappropriate for prolonged UV exposure.
Both NYY and NYM cable variants are suitable for direct burial in the ground or in concrete (with the exception of shaken, vibrated or compressed concrete -
source).
NYY is available with a UV-stabilised black PVC outer jacket, making it suitable for direct exposure to sunlight. Check with your supplier.


Considerations for the use of ducting or armoured cable relate only to protection from mechanical stress, impact or interference that could pose a risk of electric shock and/or damage to the circuit.

According to FSC Global:


  NYY cables are an economical solution to power and control wiring where mechanical protection is not required. Used both indoor and outdoor these cables are suitable for direct burial or through ducts, local regulations permitting.


If P = V x I then 3,100W at 220V requires a little over 14A.

I have the UK's BS7671:2008+A1 (2011; 17th Edition IET Wiring Regulations) with current-carrying capacity tables to offer some insight into cable sizing. Ambient outdoor temperatures in Indonesia average 28&deg;C so the tables' assumption of a 30&deg; ambient can be accepted.

The tables are not directly applicable to your situation but for armoured cable rated to 70&deg;C as is NYY, Table 4D4A gives a capacity of 29A for two-core 2.5mm buried direct in the ground or in ducting as 29A. Even allowing for various factors such as higher ground temperature, thermal insulation by the concrete, and volt drop over 50m, you're more than exceeding 14A. A 16A or even 20A circuit breaker at the beginning of the run would ensure you're not exceeding the cable's capacity to the outbuildings.

Since the cable you specify is two-core I'll assume it's NYY-O and thus has no protective earthing (grounding) conductor. For safety, you may want to run three-core NYY-J, one core of which is for earthing. At a minimum, I would expect this cable run to be protected by a Residual Current Device (RCD; also known as a Ground Fault Circuit Interrupter or GFCI). This could be combined with the overcurrent protection offered by a fuse or circuit breaker in an RCBO, but it depends what is available from your local supplier.