Best approaching for adding custom Indexes?

Thanks @sunnyson, that’s really helpful. Is it possible to create more complex indexes (e.g. compound) using a similar mechanism?