The GeoPackage standard has an extension that allows for Rtree spatial indexes (http://www.geopackage.org/guidance/extensions/rtree_spatial_indexes.html).
When writing a SpatVector to GeoPackage, we get an Rtree "for free." But I currently don't have any workflows that really make use of it. Most of my GPKG usage is as a "storage" medium, rather than for analysis. GPKG is so much better than a directory full of shapefiles (and all their ancillary files) exploring first-class geopackage support for {terra} is https://github.com/brownag/gpkg.
For example:
library(terra)
v <- vect(system.file("ex", "lux.shp", package = "terra"))