Add stack and queue implementations using arrays; rearrange util code