Dynamic arrays; not fully tested yet. Tail array optimization is not implemented yet.