3d partition functions & 4d superconformal indices from 1d free fermions