Latch relays or bits are the Data memory & M bits these can be set to retentive, in the project tree go to plc parameters and one of the last tabs are parameters there you can set the areas that retain data when plc in stop or powered down, on FX D200-255 are usually retentive by default but you can change this from D000 to Dxxx this applies to various other memory areas.
Link relays are used for comms, W words & B bits are very often used for network comms i.e. NetH these are configured in blocks as you require them for example plc1 could use W000 to W0f0 & B000 to B00ff other station would use W0100 to W01ff etc.
All user memory areas can be used just like M or D even if these are not used by comms it depends if you use GX Developer or GX Works on how you set the variables in the symbols, GX Dev only needs the first word for float as it automatically takes the second, in Works a Real or float is 32 bits so takes up D20 + D21
Arrays are as many words as required for example array 0..3 of byte is 4 bytes that's 2 words Dx to DX+1 array 0..3 of word takes up 4 words Dx to Dx+3 when you address an array you either use just the symbol i.e. Temperature this takes the whole array where Temperature[0] takes the first word only
When you create a function block with parameters what the compiler does is pass the input or in/out data to temporary scratch memory (real memory like D or M that is reserved for the compiler then jumps past the program end instruction to the code of the FB processes the code then returns and passes the temps back to the in/out data e.g. if FB has 2 input parameters 2 output parameters and 2 in/out the in and in/out values are transferred to temps the FB logic is processed then the resulting in/outs and the outs are passed back
in 1 > Temp1 in
in2 > temp2 in
Out1> Temp3 Out
In/out 1 > Temp4 in/out
In/out 2 > Temp 5 In/out
process FB code
Temp3 Out > Out1
Temp4 > In/out 1
Temp5 > In/Out 2
so it passes in
passes in/out both ways
Passes out out only
Seems a bit confusing but to keep compatibility with standard ladder it needs to be this way, you must keep the source code in Works as uploading from plc to Works will only give you STL code and probably make it difficult to understand as some of it is not easily de-compiled back to ladder.