Always access data[0] as newest data
<p>I have an array of a million elements and I'm going to be running through it simulating it as live data, by making a current index as the "right now" and incrementing it to simulate new data coming in.</p>

<p>I'll be doing a great deal of calculations on the right now data, and data X bars to the past.</p>

<p>I'm wondering if there is a convenient way to abstract this to accessing today's data at someDataType[0] and 1 bar ago as someDataType[1] and so on?</p>

<p>I'm new to programming so I'm not really sure what is and what isn't possible. Ideally this data type would not have to copy data from the array to the datatype, rather it could store all the data itself and skip the array or somehow point to the array. And it will definitely have to be able to access the data in the same way as arrays, and not have to iterate over itself to get to some point like a list would need to. </p>

<p>I really have no clue if this is possible in any way, shape, or form. Thus I'm asking. Thanks for any input! :)</p>
