Like this
most of them have it defined by the production type of the fluid boxes, so the chemical plant has 4 fluid boxes, two defined as input, two defined as output, and on pipe connections they have either type = "input" or "output"and with the small pump its just defined in the pipe_connections as "input" or "output"
But if you try using the same pipe_connection type with steam engines, pipes or storage tanks, the little arrows don't show up (i have actually only tried with steam-engine prototype)
It would be super helpful for showing where fluid connections are on sprites where it may not be immediately obvious, without having to use the pipe_covers as visual aid.
EDIT: as an aside, i thought the small pump use to show both an input and an output arrow, but for me at least it only shows the output now... maybe i'm mis-remembering