For AI agents: visit https://swiftly.readme.io/llms.txt for an index of all pages formatted in Markdown and endpoints in OpenAPI. Append .md to any documentation page URL to get its markdown version.
Create an array of elements split in to groups by the length of size. If array can't be split evenly, the final chunk contains all the remain elements.