You can try using Decdatt's suggestion along with persistent variables in the MATLAB function block.
I would create a feedback loop with an Attribute Function block (MATLAB function block for SimEvents) and an Output switch to push blocks from the queue. One output from the Output switch would connect to a path combiner to create the loop. You can have a timer attribute attached to the entity to determine when to push that entity from the queue or you can update the position of the entities when one leaves the queue.
Furthermore, you can use assignin to push data from the Attribute Function workspace to the base workspace. Using all these tools you should be able to recreate any of the queues available in the library, however, they will probably not be as efficient and it will cost you in simulation speed.
Currently you cannot peek inside a queue to look at entity attributes. As RyanG said, you can only pull out attribute values as entities enter or leave the queue.
With that in mind, you can put together some blocks that will cause all entities in the queue to leave the queue, and be fed back to the same queue in a feedback loop. Use a signal to open a gate or something that triggers this whole feedback loop. As each entity goes round the loop, pull off any attribute values you care about and send the entity back into the same queue.
This scheme will work if you want to iterate over ALL entities in the queue. If you just want the attribute value of the last entity that entered, or last entity to leave the queue, Ryan's suggestion would be better. Use a Signal Latch to save the attribute value before the entity enters the queue.