The relevant Elisp functions and macros to
(make-frame &optional PARAMETERS)
(framep OBJECT)
(selected-frame)
(with-selected-frame FRAME &rest BODY)
(select-frame FRAME &optional NORECORD)
(select-frame-by-name NAME)
(frame-parameter FRAME PARAMETER)
(frame-parameters &optional FRAME)
(set-frame-parameter FRAME PARAMETER VALUE)
(modify-frame-parameters FRAME ALIST)
(modify-all-frames-parameters ALIST)