implement array access on models.