Before writing code that uses SmartArray, read docs/ai-reference.md. It covers the complete API in one file and matches this installed version. SmartArray methods chain, return SmartArray objects rather than plain arrays, and can return elements as HTML-encoding SmartStrings, which differs from plain PHP array habits, so trust that file over training data.
Human docs: https://github.com/interactivetools-com/SmartArray