Have a look at page 40 of the datasheet for figure 5-1 "BLOCK DIAGRAM OF RA0/AN0:RA1/AN1 PINS". This shows how a single port pin works and illustrates the latches used for writing along with the buffer used for input.
When you write to PORTA you actually write to this series of data latches. When you read it comes from the input buffer. The setting of the related TRIS register (along with analogue input settings and other special functions) determines what will actually be electrically connected.
So in short: no, it doesn't matter if you write to the whole of PORTA, even if some pins are inputs.