In Agda, I can write many different records with a lookup
field.
record DVec (n : ℕ) (A : Fin n → Set) : Set where
constructor tabulate
field lookup : (i : Fin n) → A i
open DVec public
record DMat (m n : ℕ) (A : Fin m → Fin n → Set) : Set where
constructor tabulate