Hi, writing to PORT or LAT is the same thing as can be seen from the data sheet picture attached here. A Write on a PORTx or a LATx results in changing the output of the port pin physically ( if the pin is configured as an output). A read however on the LATx register will result in the last written value and not the actual logic present on the port pin. Read description in 10.1 of datasheet.
Now about you query regarding the voltage on pins, the voltage on the last nibble of PORTB is near 0 because you have configured them as outputs and are setting them LOW. For the 0.32 volts, have you got a 0.1u capacitor between the power lines? For the upper nibble part, they can not be written to since they have been configured as inputs, and also you have not turned on the pull ups. Its just an arbitrary voltage.
Have you configured them as digital pins for them to be used for the keypad?