I'm implementing a couple different page replacement algorithms (FIFO and LRU) but I'm not sure what the best way to keep track of what pages I currently have in memory. I was thinking just stick them in an array, and replace a given frame when need be, but that doesn't really do anything in regards as to which one was used last.
By memory, you mean in physically addressable memory, right? In that case, you would usually have a page table (basically an array) for each process that tells you where in physical memory (which page frame) their virtual pages are mapped to. In the entries, you could also include additional information like a timestamp of the most recent access.