Optionally return the entry idx together with the entries