Use the heapam and indexam.
There's a handy wrapper for simpler queries in genam. See systable_beginscsn etc. AFAIK these aren't really restricted to system tables.
SPI is certainly the simplest way.
Pglogical has lots of direct heap and index access via genam.