m is insert-ordered, not key-ordered. I guess “sorted” would be a better descriptor since “ordered” is ambiguous.
Yes, arrays can be used as LIFO queues. They can also be used as FIFO queues with shift() instead of pop(), but the language does not specify a complexity bound on shift() so depending on the runtime it may be O(N). And then there’s priority queues.