Need to store incoming serial data into an array

Hey People!

Can someone help me.

How can I store the data coming from the serial of the duino, I would like to store in into an array then use it again.

the data packet:

F5 2D 00 01 00 00 2D F5

then I need to send a response data packet like this:

F5 2D 00 01 00 00 2Dx00x01x00x00x2D F5

Moderator edit: Subject line amended to make it meaningful. (Nick Gammon)

Start here:

Read this before posting a programming question

Then, take a look at the Serial examples for how to handle serial communication. You've (somewhat) described your requirements, but haven't given any indication that you've tried anything yet. To me that tells me that you just want the code, you don't want to learn to write it. If that's not the case, then you need to post the code that you have so far.