Simple two file compare with twist

I have file1 and file2
I lookup field3 from file2 in field1 of file1 and if there is a match, output field 2,3,5 from file2.
I now want to add field2 of file1 in the output.

I suspect what I have to do is read the entire line of file1 into a 2 dim array? pls help.

What operating system are you using?

What shell are you using?

What is the twist? What you have so briefly described seems to have been asked and answered several times before in this forum.

What have you tried and where are you falling short of reaching your goal?

Without a sample pair of input files and a sample of the output you hope to produce from those input files, it is impossible to guess at whether you're working with fixed length fields in binary files, variable length fields separated by whitespace in a text files, unspecified fields in some kind of databases or spreadsheets, etc.