Replicate keypad using arduino (simple keypad build from switch)


I'm doing a project using 8085 microcontroller, in the project, im using this keypad

I have used all ports on the microcontroller, but i want to add bluetooth so i use arduino to control the keypad.

Here how the keypad works on 8085,
the keypad just a normal switch arranged in matrix.
if key 1 is pressed, pin for column 1 and row 1 will connect.

how ever, 8085 scan it using its own way, and it's hard to replicate the output.

so i'm thinking, i want to program arduino to be a switch, it just connect respective row and column

how to program this? any other ideas are also welcome.
thank you very much!