First, I would make a TYPE that would handle the X, Y, Z, Type of Powerup, Id, Animation_Frame, (and whatever else would be needed)
And, I would have a few functions made:
One for spawning it
FUNTION Spawn_PowerUp(X_Pos, Y_Pos, Z_Pos, TypeofPowerup)
that would give it an ID and make/show the object that will be used;
One for handling the animation and physics that would be called every loop
FUNTION Animate_PowerUp(X_Pos, Y_Pos, Z_Pos, PowerupID, Frame Number)
One for picking it up when a collision from the player occurs
FUNTION Obtain_Powerup(TypeofPowerup, PowerupID)
I would make a function for each type of power up that could be called when it is picked up by the player
FUNCTION Health_PowerUp(PowerupID)
FUNCTION Bullet_PowerUp(PowerupID)
FUNCTION Rocket_PowerUp(PowerupID)
And one for deleting/hiding it that could be called when it is picked up or drops off the bottom of the screen like mario
FUNCTION Destroy_PowerUp(PowerupID)
I know this isn't the full code or anything, but it is the structure that I usually use when making powerups and such. Hope it helps!
There's something in this room that makes you can't speak well.