What you're asking sounds a bit like "I know a bit about how to do addition. Can someone explain this calculus problem to me?"...
In order to make multiple input fields that you can switch between and scroll through yadda yadda yadda, you pretty much have to forget about using read() - which is designed to block execution of the rest of your script until someone hits enter - and instead switch to building your own version from scratch. You need to manually handle every keypress and mouseclick with your own code - figuring out which input field is active, and therefore should have characters added to it when you type stuff, how to change the active field without discarding the content of the old one, and so on.
I suppose a good example to start you off would be this basic structure:
-- Fill this table with the positions and contents of each text field:
local textfields = {}
-- Use this to figure out which index in textfields to modify when the user types stuff:
local activeField = 1
while true do
local myEvent = {os.pullEvent()}
if myEvent[1] == "mouse_click" then
-- Did the click match a position in the textfields table? Make that active if so.
elseif myEvent[1] == "key" then
-- Was the keypress something like a backspace? Remove a character from the active textfield if so.
elseif myEvent[1] == "char" then
-- Add the character to the current text field.
end
end
A good understanding of
os.pullEvent() and
tables is essential.