I just need a little help in how i should structure this in the code
Start with the example in the IDE
Blink will show you the basics of how an Arduino program is structured and needs no extra hardware.
Unfortunately the delay() command block program execution while the delay occurs, so have a look at BlinkWithoutDelay. This uses millis() for timing and lets the program run freely. That is important if you are to implement a pedestrian button which could be pressed at any time so delay() will not do the job.
Get some basic LED controller programs under your belt using the millis() timing technique before think about adding pedestrian control.
Read and try the examples in Using millis() for timing. A beginners guide, Several things at the same time and look at the BlinkWithoutDelay example in the IDE.