Inclusion Criteria:
* Age \>= 18 years
* Relapsed or refractory:
* Group E only: Relapsed peripheral T-cell lymphoma (PTCL) of the following histologies: peripheral T-cell lymphoma-NOS (PTCL-NOS); anaplastic large cell (ALCL), and mycosis fungoides (MF)
* Alanine aminotransferase (ALT) and aspartate aminotransferase (AST) =\< 2 times upper limit of normal (ULN) (obtained =\< 15 days prior to registration)
* Creatinine =\< 2.0 mg/dL (obtained =\< 15 days prior to registration)
* Direct bilirubin =\< 1.5 x ULN (obtained =\< 15 days prior to registration)
* International normalized ratio (INR)/prothrombin time (PT) and activated partial thromboplastin time (aPTT) =\< 1.5 x ULN (obtained =\< 15 days prior to registration)
* If baseline liver disease, Child Pugh score not exceeding class A (obtained =\< 15 days prior to registration)
* Negative pregnancy test for persons of child-bearing potential (obtained =\< 15 days prior to registration)
* FOR T-Cell Lymphoma (TCL)/B-Cell Lymphoma (BCL) ONLY: Absolute Neutrophil Count (ANC) \>= 1,000/microliter (μL) (obtained =\< 14 days prior to registration)
* FOR TCL/BCL ONLY: Platelets \>= 100,000/μL (obtained =\< 14 days prior to registration)
* FOR TCL/BCL ONLY: Hemoglobin \>= 8.5 g/dl (obtained =\< 14 days prior to registration)
* FOR TCL/BCL ONLY: Measurable disease by CT or magnetic resonance imaging (MRI): must have at least one lesion that has a single diameter of \> 2 cm or tumor cells in the blood \> 5 x 10\^9/L; NOTE: skin lesions can be used if the area is \> 2 cm in at least one diameter and photographed with a ruler and the images are available in the medical record
* Absence of active central nervous system (CNS) involvement; NOTE: pre-enrollment lumbar puncture not mandatory
* Ability to provide written informed consent
* Willingness to return to Mayo Clinic for follow-up
* Life expectancy \>= 12 weeks
* Eastern Cooperative Oncology Group (ECOG) performance status (PS) 0, 1, or 2
* Willing to provide mandatory biological specimens for research purposes
Exclusion Criteria:
* Availability of and patient acceptance of curative therapy
* Uncontrolled infection
* Active tuberculosis or hepatitis, or chronic hepatitis
* Any of the following prior therapies:
* Chemotherapy (IMIDs, alkylating agents, proteosome inhibitors) =\< 2 weeks prior to registration
* Immunotherapy (monoclonal antibodies) =\< 4 weeks prior to registration
* Experimental agent in case of Acute Myeloid Leukemia (AML) or TCL within 4 half-lives of the last dose of the agent
* New York Heart Association classification III or IV, known symptomatic coronary artery disease, or symptoms of coronary artery disease on systems review, or known cardiac arrhythmias \[atrial fibrillation or supraventricular tachycardia (SVT)\]
* Active CNS disorder or seizure disorder or known CNS disease or neurologic symptomatology; in case of AML active CNS involvement as detected by lumbar puncture or neuro-imaging (only to be done if clinically indicated)
* Human immunodeficiency virus (HIV) positive test result or other immunodeficiency or immunosuppression
* Other concurrent chemotherapy, immunotherapy, radiotherapy, or any ancillary therapy considered investigational (used for a non-Food and Drug Administration \[FDA\] approved indication and in the context of a research investigation);
* NOTE: in TCL, patients may use topical emollients or corticosteroids, acetic acid soaks, etc. to control pruritis and prevent infection; no topical chemotherapy is allowed (no topical nitrogen mustard)
* Any of the following because this study involves an investigational agent whose genotoxic, mutagenic and teratogenic effects on the developing fetus and newborn are unknown:
* Pregnant women or women of reproductive ability who are unwilling to use effective contraception
* Nursing women
* Men who are unwilling to use a condom (even if they have undergone a prior vasectomy) while having intercourse with any woman, while taking the drug and for 4 weeks after stopping treatment
* ADDITIONAL EXCLUSION CRITERIA FOR GROUP E (COMBINATION WITH IPILIMUMAB AND CEMIPLIMAB) ONLY:
* Diagnosis of AML
* Diagnosis of Angioimmunoblastic T-cell Lymphoma (AITL)
* Hypersensitivity to ipilimumab or its excipients