Sure, as long as only one PIC's TRIS register is set to output at a time. The code in each PIC will have to watch the respective "ChipEnable" input Pin, and then set its four output pins to output mode only as long as ChipEnable is high; when it goes low, it will have to set its four output pins to input mode.