Yes. There are three things you would need to do. The first is the keyboard matrix. Keyboards are normally made using a matrix of outputs to inputs, where each key on the keyboard corresponds to one combination of in and out. 8x8 is a common matrix. Smaller phone keypads are an example of 4x3 and 4x4 matrixes, and are commonly used in Arduino projects.
The second part and third part are intertwined. The second part is the protocol to the computer. Serial, PS/2 or USB are common ones, with USB being the most recent (bluetooth as well, but that's wireless). Serial and PS/2 can be bitbanged, as can USB, but it is slightly harder. V-USB is a project for software USB implementation on ATTINY and ATTMEGA (like the arduino) processors.
The third part is the actual code between reading keyboard matrix, and sending it over usb. On the USB side you want a USB-HID keyboard (driverless on the PC side). On the keyboard side, you can use polling or interrupts. Your code would decide what matrix combination is what keyboard key, and what keyboard scan code.
The Function keys are essentially handled by software, same as the shift/control/option/command/windows key are. Your code would read the function key being pressed, then any other key being pressed would send the key+function scan code, instead of just the key scan code.
Simply googling "Arduino USB Keyboard" will give you a literal google of example projects doing as such. Also "Arduino Keypad".