I think that arrays and especially sheets (dynamic arrays) are useless, but if they are used, then no?
So I think the type is this: if the array is sorted, then it is sorted for binary search, but for binary search there is a binary search tree (balanced), the insertion / deletion in which will be O (log n), when in the array O (n), there is a sorted array <balanced binary search tree, and if the array is not sorted, then why do we need it, if we can then use a linked list?
For then the search is the same, and the insert / delete is O (1). And the dynamic array is bad, because every time you insert, the service that participates in memory allocation will look for new places in memory, where there will be n + 1 (+1 is a new element) of free cells in a row. That is, a dynamic array spends a lot of effort on searching for cells when a coherent list simply indicates a link to the next. element. Well, if the dynamic array is sorted, then we use a balanced binary search tree, where, too, when inserting / deleting, there will be no messing with cells, just change the links and balance.
So what is the profit of arrays? Why do I see arrays and sheets in each first code (dynamic arrays or lists)?