Select the nth element of an array created dynamically in a query
You need a couple things. It seems postgres *requires* the additional parentheses around the function invocation -- which is annoying but workable.

```python

from peewee import EnclosedNodeList
from playhouse.postgres_ext import ObjectSlice

# Function invocation - nothing weird here.
f = fn.string_to_array(Page.url, '/')

# Wrap function invocation in additional parentheses.
fp = EnclosedNodeList([f])

# Indexing operation. Postgres uses 1-based indexes, so 1->2.
# This addition happens in Peewee to allow Python code to emulate
# python's 0-based indexing.
item = ObjectSlice(fp, [1])

query = Page.select(item.alias('url_part'))
```
Love peewee, using the most recent version (3.13.1) and I've run into a situation causing an error. I may not have the right syntax, but after scouring the web and the docs and the source code I can't find it if it exists.

I'm trying to mimic this SQL, which works in Postgres:

```sql
select (string_to_array(page.url, '/'))[2] from page;
```

Getting array elements from fields using the `ArrayField` extension works, but when the arrays are created with `string_to_array` the way to access a specific element is not obvious.

Here's the setup:

```python
from peewee import Model, fn, CharField
from playhouse.postgres_ext import PostgresqlExtDatabase

peewee_db = PostgresqlExtDatabase('mydbname')

class Page(Model):
    url = CharField(null=True)

    class Meta:
        database = peewee_db

peewee_db.connect()

Page.select(fn.STRING_TO_ARRAY(Page.url, '/')[2]).execute()
```

And it produces this output:

```
peewee.ProgrammingError: operator does not exist: text[] = integer
LINE 1: SELECT (STRING_TO_ARRAY("t1"."url", '/') = 2) FROM "page" A...
                                                  ^
HINT:  No operator matches the given name and argument types. You might need to add explicit type casts.
```

If there is a cast or function that can get the nth item out in a situation like this I would really appreciate the help in figuring it out. The types `text[]` and `integer` look right to me, which I think is where some of the confusion is coming from.