All the PLC's I/Os, internal relays, timers, counters and data memory have specific addresses mapped to the Modbus holding register or input register space. The memory map can be found on Table 14.1 (page 14-8) on the Nano-10 User's Manual.
http://www.triplc.com/documentations.htmE.g. input #1 to #16 are mapped to a single 16-bit Modbus holding register 40001. So you HMI can simply read from holding register 40001 to get all 16 inputs in a single register.
Inputs 1-16 are also mapped as bit number 1 to 16 of the Modbus input register space accessible as individual bit using Modbus function 02.
Likewise DM[] data are mapped to holding register space 41001 to 45000 and these are both readable and writeable.
So you don't have to do anything inside the PLC's ladder or TBASIC program to make this happens. It is already there, just have to map it correctly.
And you are right that READMODBUS, WRITEMODBUS, READMB2 and WRITEMB2 are only used when the PLC is the master (or client) and not required when it is a slave (or server).
Note that Modbus have two addressing conventions - Modicon convention has a prefix such as 4xxxxx for holding register, 3-xxxx for input register etc. Another is a binary addressing convention where everything starts from 0. So you need to find out which convention your HMI is using.